|
|
|
|
|
by pjc50
4519 days ago
|
|
"easy to debug as a segfault would" I'm on a weird embedded platform where segfaults are almost impossible to debug; the only way to get information out is a log facility over USB that loses the most recent lines of log when it segfaults and resets :( |
|
Similar problems may haunt you when working in kernel space.
But still, null pointers are easy compared to other invalid pointers that can not be distinguished by their value.
Best practices in C are not as easy to make as in other languages because the environment the code runs in may be anything from a micro controller to an embedded platform to kernel space to modern user space apps. It's not so much about the language as it is about the environment the code runs in.