Summary: Strange behavior of RedBlackTree causeing a dangling
           Product: D
           Version: D2
          Platform: x86
        OS/Version: Linux
            Status: NEW
          Severity: blocker
          Priority: P2
         Component: DMD

--- Comment #0 from Timofei Bolshakov <> 2011-10-03 08:35:32 
PDT ---
Created an attachment (id=1033)
Module where 2 classes are defined, initialization of RBT is done in inner
class constrcutor

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:
------- You are receiving this mail because: -------

Reply via email to