Bug 13722 – onFinalizeError should not allocate

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
druntime
Product
D
Version
D2
Platform
All
OS
All
Creation time
2014-11-12T21:44:00Z
Last change time
2015-02-03T19:37:44Z
Assigned to
nobody
Creator
dlang-bugzilla
See also
https://issues.dlang.org/show_bug.cgi?id=13723

Comments

Comment #0 by dlang-bugzilla — 2014-11-12T21:44:51Z
As our GC is non-reentrant, allocating during a GC run (when invoked by the GC for finalization) is invalid. Thus, onFinalizeError should use the same pattern as onOutOfMemoryError to avoid allocating memory.
Comment #1 by dlang-bugzilla — 2014-11-12T22:02:29Z
onFinalizeError needs to chain the caught exception, thus we can't use the same pattern as onOutOfMemoryError.
Comment #2 by code — 2015-02-03T19:37:44Z
Fixed by https://github.com/D-Programming-Language/druntime/commit/0b72987df17354c83bc302672f4f132fe03db65a. We currently still allocate the TraceInfo so it doesn't yet work.