Stacktrace on Null Pointer Derefence

Nordlöw via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Thu Sep 22 12:51:31 PDT 2016


On Thursday, 22 September 2016 at 00:46:19 UTC, ketmar wrote:
> { import etc.linux.memoryerror; registerMemoryErrorHandler(); }

Thx! That at least triggered an exception. However the line 
number for the innermost function is wrong. For instance

1   void boom()
2   {
3       int* y = null;
4       *y = 42;                    // boom
5   }

gives stacktrace

etc.linux.memoryerror.NullPointerError at src/etc/linux/memoryerror.d(325)
----------------
??:? [0x404e6d]
??:? [0x404dba]
t_segFaulException.d:3 [0x402301]
t_segFaulException.d:22 [0x402370]
??:? [0x402a2e]
??:? [0x402978]
??:? [0x4029ea]
??:? [0x402978]
??:? [0x4028e9]
??:? [0x40247f]
??:? __libc_start_main [0x2867d82f]

A known bug?


More information about the Digitalmars-d-learn mailing list