SegFaults when using Fibers

Danny Arends Danny.Arends at gmail.com
Wed Aug 10 02:53:15 PDT 2011


(Also posted this in bugs, but I think it needs to be here)

When I try to print floats and doubles from a fiber it fails with a
segfault, while it is possible to do the same in the main thread.

The expected output of the attached code file:
15
15
Done

However I get:
15
segfault

I am using the DMD64 D Compiler v 2.054 on Debian 64

What am I doing wrong, because using to!string() on the floats and
double allows me to print them to std.out.

I however get weird behavior when I try to do math on the floats and
doubles in the fiber, or when I pass them to C-functions.

Any Help would be appreciated
Kind regards,
Danny
begin 644 test.d
M+RHJ"B`J($)U9R!R97!O<G0 at 9F]R($1-1#8T($0 at 0V]M<&EL97(@=C(N,#4T
M(`H@*B`R,#$Q($1A;FYY($%R96YD<PH@*BHO"FEM<&]R="!C;W)E+G1H<F5A
M9#L*:6UP;W)T('-T9"YS=&1I;SL*"F-L87-S(%1E<W1#;&%S<R`Z($9I8F5R
M>PIP=6)L:6,Z"B`@=&AI<R at I>R!S=7!E<B at F<G5N*3L@?0H@(`H@('9O:60@
M<G5N*"E["B`@("!I;G0@>#T@,3`["B`@("!I;G0@>3T at -3L*("`@(&9L;V%T
M(&UY9&]U8FQE(#T@>"MY.PH@("`@=W)I=&5L;BAM>61O=6)L92D[("\O5&AI
M<R!S96=F875L=',*("`@('EI96QD*"D["B`@?0I]"@IV;VED(&UA:6XH<W1R
M:6YG6UT at 87)G<RE["B`@:6YT('@](#$P.PH@(&EN="!Y/2`U.PH@(&9L;V%T
M(&UY9&]U8FQE(#T@>"MY.PH@('=R:71E;&XH;7ED;W5B;&4I.R`O+U1H:7,@
M=V]R:W,*"B`@5&5S=$-L87-S('1E<W1&:6)E<B`](&YE=R!497-T0VQA<W,H
M*3L*("!T97-T1FEB97(N8V%L;"@I.PH@('=R:71E;&XH(D1O;F4B*3L*?0H`
`
end


More information about the Digitalmars-d-learn mailing list