Why is it so difficult to get a core dump for exceptions/errors?

Nemanja Boric 4burgos at gmail.com
Mon Oct 23 06:48:50 UTC 2017


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 at 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.


More information about the Digitalmars-d mailing list