www.digitalmars.com         C & C++   DMDScript  

D - Concat strings in destructor causes deadlock - TestAuto.d

If you concat a string in a destructor, a deadlock can occur.  I imagine that
there is something with allocating while deallocating, but I'm not sure.
Attached is sample code that exposes this condition.


begin 0644 TestAuto.d
M" H*"F-L87-S(%1E<W1!=71O"GL*" EP<FEV871E. H)"6-H87);72!I.PH)
M"0H*"7!U8FQI8SH*"71H:7,H*2`*"7L*"0EP<FEN=&8H(FEN:70A("( ?B!I
M('X (EQN(BD[" E]" H)?G1H:7,H*2`*"7L*"0DO+V5N86)L:6YG('1H:7, 
M=VEL;"!C875S92!D96%D;&]C:SH*"0EP<FEN=&8H(F1E<W1R=6-T("( ?B!I
M('X (EQN(BD[" E]" D*"79O:60 <V5T22AC:&%R6UT ;F5W22D >PH)"6D 
M/2!N97=).PH)?0H*"6-H87);72!G971)*"D >PH)"2\O<WEN8VAR;VYI>F5D
M*'1H:7,I('L*"0D)<F5T=7)N(&D[" D)+R]]" E]"GT*" H*=F]I9"!M86EN
M*&-H87( 6UU;76%R9W,I"GL*"6YO075T;R I.PH)<')I;G1F*")M:60 =V%Y
M7&XB*3L*(`H)=VET:$%U=&\H*3L*"GT*"G9O:60 ;F]!=71O*"D >PH)5&5S
M=$%U=&\ =&5S="`](&YE=R!497-T075T;R I.PH*"71E<W0N<V5T22 B;F]!
M=71O(BD[" H)<')I;G1F*")B969O<F4 9&5L971E7&XB*3L*"61E;&5T92!T
M97-T.PH)<')I;G1F*")A9G1E<B!D96QE=&5<;B(I.PH*?0H*=F]I9"!W:71H
M075T;R I('L*"0EA=71O(%1E<W1!=71O('1E<W0 /2!N97< 5&5S=$%U=&\H
A*3L*" D)=&5S="YS971)*")W:71H075T;R(I.PH*"GT*
`
end
Dec 11 2003