dereferencing null

H. S. Teoh hsteoh at quickfur.ath.cx
Mon Mar 5 14:52:27 PST 2012


On Mon, Mar 05, 2012 at 05:31:34PM -0500, Steven Schveighoffer wrote:
[...]
> I wholeheartedly agree that we should use the hardware features that
> we are given, and that NullPointerException is not worth the bloat.
> But we should be doing *something* better than just printing
> "Segmentation Fault".
[...]

On Linux, you can catch SIGSEGV and print a stacktrace in the signal
handler. This is pretty standard procedure.

In theory, we *could* have druntime install a handler for SIGSEGV upon
program startup that prints a stacktrace and exits (or do whatever the
equivalent is on Windows, if compiled on Windows).


T

-- 
Let's eat some disquits while we format the biskettes.


More information about the Digitalmars-d mailing list