Why null reference not showing crash.
Richard (Rikki) Andrew Cattermole
richard at cattermole.co.nz
Sat Aug 2 22:13:52 UTC 2025
It does die from the segfault.
Program terminated with signal: SIGSEGV
Note: by default D does not throw an exception (it would be an Error not
Exception).
There is some code to do this for linux, and we've approved if someone
is willing to implement it, a read barrier to check for null deref
behind a CLI switch.
Unfortunately right now, segfaults in D may or may not generate a stack
trace, it depends upon the platform and if you've got debug info
compiled in.
For posix systems you have to inspect the core dump of the process after
it dies. What to do for this isn't D specific, and you can find
tutorials for it by platform.
More information about the Digitalmars-d-learn
mailing list