← Back to index
|
Original Bugzilla link
Bug 14993 – Allocating in a destructor segfaults instead of throwing InvalidMemoryOperationError
Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P1
Component
druntime
Product
D
Version
D2
Platform
All
OS
All
Creation time
2015-09-01T11:18:00Z
Last change time
2015-10-14T14:36:47Z
Keywords
pull
Assigned to
nobody
Creator
dlang-bugzilla
Comments
Comment #0
by dlang-bugzilla — 2015-09-01T11:18:27Z
/////// test.d /////// struct S { ~this() { new int; } } void main() { foreach (n; 0..10) { new S[10]; } } ////////////////////// Introduced in
https://github.com/D-Programming-Language/druntime/pull/1325
Comment #1
by code — 2015-09-06T04:22:09Z
This broke b/c of an ugly hack in druntime which excluded throwing typeinfo(Ex).init.ptr style exceptions from stacktraces.
https://github.com/D-Programming-Language/druntime/blob/46fdff3c82d917c94a79f355274770147bf8bdae/src/rt/deh.d#L22
The underlying issue is the same as issue 14119, stacktraces should be @nogc.
Comment #2
by code — 2015-10-12T16:21:22Z
https://github.com/D-Programming-Language/druntime/pull/1406
Comment #3
by github-bugzilla — 2015-10-14T10:34:33Z
Commits pushed to stable at
https://github.com/D-Programming-Language/druntime
https://github.com/D-Programming-Language/druntime/commit/ee306cc93e7feb894f8fb618b4aae340878c0d54
fix Issue 14993 - segfault for InvalidMemoryOperationError - creating a stacktrace currently uses the GC (thus might recurse infinetely when the GC throws an exception itself) - suppress stack traces for OutOfMemoryError, InvalidMemoryOperationError, and FinalizeError
https://github.com/D-Programming-Language/druntime/commit/d3dad79e43a703800ae4407b3d33812f869e3fcc
Merge pull request #1406 from MartinNowak/fix14993 fix Issue 14993 - segfault for InvalidMemoryOperationError
Comment #4
by github-bugzilla — 2015-10-14T14:36:47Z
Commits pushed to master at
https://github.com/D-Programming-Language/druntime
https://github.com/D-Programming-Language/druntime/commit/ee306cc93e7feb894f8fb618b4aae340878c0d54
fix Issue 14993 - segfault for InvalidMemoryOperationError
https://github.com/D-Programming-Language/druntime/commit/d3dad79e43a703800ae4407b3d33812f869e3fcc
Merge pull request #1406 from MartinNowak/fix14993