digitalmars.D.bugs - [Issue 15894] New: Allow setting of rt_trapExceptions from module
- via Digitalmars-d-bugs (24/24) Apr 07 2016 https://issues.dlang.org/show_bug.cgi?id=15894
https://issues.dlang.org/show_bug.cgi?id=15894 Issue ID: 15894 Summary: Allow setting of rt_trapExceptions from module c'tors Product: D Version: D2 Hardware: x86_64 OS: All Status: NEW Severity: enhancement Priority: P1 Component: druntime Assignee: nobody puremagic.com Reporter: dmdtracker supradigital.org If you want a proper core dump upon an assert failure (or generally a uncaught exception), you have to set rt_trapExceptions to 0. You can't do that however without either compiling your own runtime or attaching a debugger and setting it from there before main() is called. While you can change the variable (as it is a global extern (C), your change has no effect because all user code is run only after the variable has been read. This PR changes the behavior so that changes to that variable done from a module c'tor will cause your main() to be called without the exception trap: https://github.com/D-Programming-Language/druntime/pull/1538 --
Apr 07 2016