[Issue 6761] New: Strange behavior of RedBlackTree causeing a dangling pointer

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Oct 3 08:36:13 PDT 2011


http://d.puremagic.com/issues/show_bug.cgi?id=6761

           Summary: Strange behavior of RedBlackTree causeing a dangling
                    pointer
           Product: D
           Version: D2
          Platform: x86
        OS/Version: Linux
            Status: NEW
          Severity: blocker
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: tbolsh at gmail.com


--- Comment #0 from Timofei Bolshakov <tbolsh at gmail.com> 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
>./rbt_bug2
0
3076390832

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: -------


More information about the Digitalmars-d-bugs mailing list