News for hackers. Stuff that matters.
Re:A Reply to “Let’s stop copying C” by asveikau on Sunday January 26, 2020 @12:01AM (#22150473)
This is indeed how certain language runtimes generate null pointer exceptions. It would be too slow to add comparisons against null to every use of a pointer. So they handle SIGSEGV and raise the exception if the faulting access is on the null page.

Interesting side question: if you have a struct bigger than a page, and you dereference the end of it... How big does it have to be to not get this behavior?

Re:A Reply to “Let’s stop copying C” by WalterBright on Sunday January 26, 2020 @12:04AM (#22150482)
That's a great question. The best way to find out is to write a program that pokes every 4k until you find the boundary.