[Issue 22748] New: ~this() @nogc { synchronized ...... } liable to onMemoryOperationError
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Feb 8 15:47:31 UTC 2022
https://issues.dlang.org/show_bug.cgi?id=22748
Issue ID: 22748
Summary: ~this() @nogc { synchronized ...... } liable to
onMemoryOperationError
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: destructionator at gmail.com
I don't have a minimized example, this came up in the middle of a large work
application, but examining the source code and the stack trace reveals the
issue.
The destructor is @nogc hoping to avoid these, but this slipped through. I'm
not sure if it should actually fail the nogc check (though it does fail a
nothrow check which is interesting but not necessarily a bug per se), but
regardless we should do something.
synchronized(this) calls ensureMontior which calls GC.setAttr which throws the
invalid memory operation error.
--
More information about the Digitalmars-d-bugs
mailing list