[Issue 5653] Allocating in a destructor called during a GC corrupts memory

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Jun 17 10:59:45 PDT 2011


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


Sean Kelly <sean at invisibleduck.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
                 CC|                            |sean at invisibleduck.org


--- Comment #6 from Sean Kelly <sean at invisibleduck.org> 2011-06-17 10:54:59 PDT ---
Note that this patch will cause all successive allocations by the process to
generate an OOME, since gcx.running will be true forever.  This may be a good
stopgap fix, but ultimately the GC has to support allocations inside a
finalizer.  The best approach is probably to effectively disable the GC when
it's running so an allocating finalizer would simply create a new Pool if no
memory was available.  It looks like the collect routine still needs to be
rewritten with this in mind, however.

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