[Issue 1512] New: GC infinite loop when invalid user code runs.
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Sep 17 20:40:01 PDT 2007
http://d.puremagic.com/issues/show_bug.cgi?id=1512
Summary: GC infinite loop when invalid user code runs.
Product: D
Version: 1.014
Platform: PC
OS/Version: Windows
Status: NEW
Severity: normal
Priority: P2
Component: Phobos
AssignedTo: bugzilla at digitalmars.com
ReportedBy: davidl at 126.com
class weirdclass
{
void func()
{
delete this;
}
}
void main()
{
auto inst=new weirdclass;
inst.func;
delete inst; // GC loops here
}
If I read disassembly correctly:
it loops in phobos code gcx.d
// Mark each free entry, so it doesn't get scanned
for (n = 0; n < B_PAGE; n++)
{
for (List *list = bucket[n]; list; list = list.next) // loops here
{
pool = findPool(list);
assert(pool);
pool.freebits.set(cast(uint)(cast(byte *)list - pool.baseAddr)
/ 16);
}
}
Though i didn't recompile phobos to confirm this.
--
More information about the Digitalmars-d-bugs
mailing list