Replies: 1 comment 1 reply
|
yeah i have some code just need to integrate it too and i haven't done any open source work for a while, just been busy. but i wanna get it in soon. my plan for the first draft is to just print and abort unless rtTrapExceptions=0. So you can't catch it, but it will print it. then maybe later we can make null pointers actually throw w/ a codegen change in the compiler but that's actually harder than installing a signal handler. though fyi if you set up jit debugging - which is an OS feature - or just run the program explicitly in the debugger you not only get the stack trace but tons more info. that's why i don't want the handler if trapExceptions=0, to try to not ruin the debugger experience. |
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Currently, if a D app has a segmentation fault, it terminates with unhelpful "-11 segfault" error message without a stack trace. I have found this old thread on D forum: https://forum.dlang.org/post/vuiupmoozcqljrkwjrhu@forum.dlang.org. TBH I just copy-pasted a piece of code from there and it worked for me. I didn't think too much why.
I'm wondering if it's possible to have meaningful segfault error message out of the box, without weird tricks. As I understand from the thread, this approach will work only for unixlike, but not for Windows.
I can't speak for everybody, but for me segfaults account for 90% runtime crashes. Having a meaningful stack trace would be a very welcome quality of life improvement
All reactions