Bug 14119 – Must not allocate TraceInfo for FinalizeErrors

Status
NEW
Severity
normal
Priority
P3
Component
druntime
Product
D
Version
D2
Platform
x86_64
OS
All
Creation time
2015-02-03T19:45:24Z
Last change time
2024-12-07T13:34:46Z
Assigned to
No Owner
Creator
Martin Nowak
Moved to GitHub: dmd#17291 →

Comments

Comment #0 by code — 2015-02-03T19:45:24Z
The GC is currently not reentrant, thus we can't allocate during finalization. If an exception is thrown in a finalizer, it will allocate a TraceInfo object, even if the exception was preallocated.
Comment #1 by code — 2015-04-01T03:40:53Z
Same goes for onOutOfMemoryError which is even marked as @nogc, even though the trace is allocated using the GC.
Comment #2 by code — 2015-04-21T22:48:26Z
We should require http://dlang.org/library/core/runtime/runtime.trace_handler.html to be @nogc. For a deprecation phase we could still accept allocating trace handlers, but not call them in @nogc errors like onOutOfMemoryError.
Comment #3 by code — 2015-09-06T04:10:57Z
*** Issue 14597 has been marked as a duplicate of this issue. ***
Comment #4 by robert.schadek — 2024-12-07T13:34:46Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/17291 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB