On Monday, 23 October 2017 at 06:48:50 UTC, Nemanja Boric wrote:
On Sunday, 22 October 2017 at 11:16:56 UTC, Marenz wrote:
One thing that bugged me for years in D is how difficult it is to get a useful core dump.

```
Task terminated with unhandled exception: Invalid memory operation Full error: core.exception.InvalidMemoryOperationError@src/core/exception.d(693): Invalid memory operation
----------------
uncaught exception
dwarfeh(224) fatal error
```


What version of compiler/runtime are you using? I've fixed this behaviour (fatal error if no exception handler is found) in v2.076: https://github.com/dlang/druntime/pull/1673 and the fix should actually call abort(): https://github.com/dlang/druntime/pull/1673/files#diff-6c3bc1200b51af9b16b902fd88879ca1R227

Judging from the output (dwarfeh(224) fatal error), this patch is not applied
in your runtime.


That or he's hitting one of the other cases. But looking at the line number, seems unlikely.

https://github.com/dlang/druntime/blob/e160a6ad90900917010619c944db2d55731b527d/src/rt/dwarfeh.d#L224

Perhaps dmd druntime could be smarter here and also dump the stack trace to stderr.

But first, updates your compiler.

Reply via email to