Summary: Strange behavior of RedBlackTree causeing a dangling
--- Comment #0 from Timofei Bolshakov <tbo...@gmail.com> 2011-10-03 08:35:32
Created an attachment (id=1033)
Module where 2 classes are defined, initialization of RBT is done in inner
That error I was trying to comprehend for a lot time and I still do not
understand its causes. To see it one need to compile first module and to
compile the second one with -unittest and run those unittests, like that:
>dmd -c RedBlackTree_bug2_1.d
>dmd -unittest RedBlackTree_bug2_2.d RedBlackTree_bug2_1.o -ofrbt_bug2
Not only length is damaged - everything is. In real life program dies with core
dumped. I can't tell for sure, but the behavior looks like a dangling pointer.
That code was working (with slight modification, because RBT is a struct there
instead of class) in version 2.052.
That prevent me from switching to newer versions of dmd and I consider this bug
to be a blocking bug for me. This error was present in version 2.053 as well,
but back then I was not able to extract it into small example.
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------