[Issue 22778] druntime: infinite loop in gc_term if an object destructor throws
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Feb 16 10:07:40 UTC 2022
https://issues.dlang.org/show_bug.cgi?id=22778
Iain Buclaw <ibuclaw at gdcproject.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |ibuclaw at gdcproject.org
--- Comment #1 from Iain Buclaw <ibuclaw at gdcproject.org> ---
There's already this guard in defaultTraceHandler:
---
// avoid recursive GC calls in finalizer
import core.memory : GC;
if (GC.inFinalizer)
return null;
---
So if the GC cannot be avoided entirely in allocating, there would need to be a
similar check for when GC.collect() is running.
--
More information about the Digitalmars-d-bugs
mailing list