|
|
|
|
|
by uecker
1 day ago
|
|
The kernel is perhaps bit special. In the past they had bugs such as first derferencing and then checking for null and weird possibilities to map the zero page. But today I am not convinced this is really needed. In general on a system where you trap when accessing the zero page, this optimization should be safe and a null pointer dereferences should (safely) trap. |
|
If you mean that C compiler writers "should" prioritise sanity over high scores on microbenchmarks, then I agree. However in practice they do not and this optimization is not remotely safe.