Did they really have to tell their programmers this ? (see Page 52)
AV Rule 174 (MISRA Rule 107)
The null pointer shall not be de-referenced.
replies(3):
The rule is likely speaking to this code.
I was getting to a point in the code. I could tell by a log statement or some such. But I didn't know in what circumstances I was getting there - what path through the code. So I put in something like
char *p = 0;
*p = 1;
in order to cause a core dump. That core dump gave me the stack trace, which let me see how I got there.But I never checked that in. If I did, I would expect a severe verbal beating at the code review. Even more, it never made it into release.