[Issue 9614] New: Uninitialized holes in function stack frames confuses GC

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Feb 27 22:39:44 PST 2013


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

           Summary: Uninitialized holes in function stack frames confuses
                    GC
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: verylonglogin.reg at gmail.com


--- Comment #0 from Denis Shelomovskij <verylonglogin.reg at gmail.com> 2013-02-28 09:39:42 MSK ---
Because of uninitialized holes in function stack frames for padding and
temporaries lots of incorrect roots are created. Unless we have a precise GC we
need to zero-fill such holes. And even with precise GC holes for temporaries
which can point to GC memory also have to be zero-filled.

Example:
---
...
    // `f` has some stack pointers to GC memory
    f();
    ...
    // some stack pointers from `f` will be in holes
    // of `collect` and subsequent functions
    GC.collect();
...
---

A quick library workaround for now can be at least clear enough stack memory on
`GC.collect` call to allow it collect in cases like in example above.

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