www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 12915] New: RedBlackTree leaks memory


          Issue ID: 12915
           Summary: RedBlackTree leaks memory
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: Phobos
          Assignee: schveiguy yahoo.com
          Reporter: code dawg.eu

We found this problem in a druntime GC benchmark.
It seems like the compiler inlines some functions and therefor a false pointer
to a stale node remains in a register or on the stack. Furthermore every
previously allocated node is referenced from that pointer.
I could resolve the issue by nulling _left, _right and _parent at the end of
but I don't understand enough of the implementation to be sure that this
doesn't break anything.

Jun 13 2014