[Issue 14536] Calling destroy() on a on an extern(C++) class causes a segfault
https://issues.dlang.org/show_bug.cgi?id=14536 --- Comment #5 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/dlang/druntime https://github.com/dlang/druntime/commit/0d98f69de3e4ef83eac86d8c39dce71053fda008 Fix issue 14536 - destroy() works on extern(C++) classes https://github.com/dlang/druntime/commit/ace9f08fd743a3fc1bf6d345d05b0ee4929bfb83 Merge pull request #2176 from TurkeyMan/destroy_cpp_class Fix issue 14536 - destroy() works on extern(C++) classes --
[Issue 14536] Calling destroy() on a on an extern(C++) class causes a segfault
https://issues.dlang.org/show_bug.cgi?id=14536 github-bugzi...@puremagic.com changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED --
[Issue 14536] Calling destroy() on a on an extern(C++) class causes a segfault
https://issues.dlang.org/show_bug.cgi?id=14536 --- Comment #4 from Manu--- I dun a fix: https://github.com/dlang/druntime/pull/2176 Depends on: https://github.com/dlang/dmd/pull/8224 --
[Issue 14536] Calling destroy() on a on an extern(C++) class causes a segfault
https://issues.dlang.org/show_bug.cgi?id=14536 Simen Kjaeraaschanged: What|Removed |Added CC||simen.kja...@gmail.com --- Comment #3 from Simen Kjaeraas --- >From what I can see, it's caused here: https://github.com/dlang/druntime/blob/master/src/rt/lifetime.d#L1393 c is null, and the first iteration of the do-while loop tries to deref it. Probably, line 1403 (_d_monitordelete) would also fail, since C++ classes don't have the monitor. If it doesn't fail, it's unlikely to do anything nice. --
[Issue 14536] Calling destroy() on a on an extern(C++) class causes a segfault
https://issues.dlang.org/show_bug.cgi?id=14536 Manuchanged: What|Removed |Added Keywords||C++, industry CC||turkey...@gmail.com OS|Linux |All Severity|enhancement |major --- Comment #2 from Manu --- Modifying the priority; fixing a segfault is not an enhancement request. destroy() is objectively broken, druntime functions shouldn't crash when given apparently valid inputs used as specified. Also, this has been here for years now, I'd love to bring new attention to it. --
[Issue 14536] Calling destroy() on a on an extern(C++) class causes a segfault
https://issues.dlang.org/show_bug.cgi?id=14536 ZombineDevchanged: What|Removed |Added CC||petar.p.ki...@gmail.com --
[Issue 14536] Calling destroy() on a on an extern(C++) class causes a segfault
https://issues.dlang.org/show_bug.cgi?id=14536 Martin Nowakchanged: What|Removed |Added CC||c...@dawg.eu --- Comment #1 from Martin Nowak --- cat > bug.d << CODE extern(C++) class Bar {} void main() { auto inst = new Bar; delete inst; } CODE Crashes in rt_finalize2. Weirdly enough works with `scope` classes. I vaguely remember someone hacked around that crash for scope classes in dmd. --