https://issues.dlang.org/show_bug.cgi?id=19316
Steven Schveighoffer <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|REOPENED |RESOLVED CC| |[email protected] Resolution|--- |INVALID --- Comment #3 from Steven Schveighoffer <[email protected]> --- The GC's finalizer execution should not be treated as being called via the allocation. It can be thought of as the GC hijacking the thread's call stack to run the finalizers independent of the safe function (or pure function, or whatever else is restricted). You can imagine the finalizers running in a separate thread completely (which actually could be implemented), and then the "problem" in this bug is eliminated, but doesn't change semantics at all. In fact, at that point, any pure or safe function could call an impure or unsafe finalizer because the OS has interrupted that thread with a signal. This bug is invalid. --
