4 ms·
I believe some old borland compilers mapped 0 to a guard value, and checked if it ever changed to see if there were accidental writes to null. I feel that was
by Tuna-Fish 17y ago
I believe some old borland compilers mapped 0 to a guard value, and checked if it ever changed to see if there were accidental writes to null.
I feel that was a stupid approach, and having 0 unmapped is actually the better choice -- instant seqfault is imho a better way to know your program failed.
- barrkel 17y agoAre you thinking of DOS? I can't imagine a Win32 compiler doing this.
- spudlyo 17y agoHeh, in DOS a far NULL pointer was the start of the interrupt vector table -- divide by zero being first. I remember writing a program that wrote the address of one of my subroutines to a far NULL pointer and then dividing by zero.