mheinsen / seec

Program visualization and debugging for novice C programmers
http://seec-team.github.io/seec/
MIT License
3 stars 0 forks source link

Misleading error messages from pointer checking. #53

Closed mheinsen closed 8 years ago

mheinsen commented 9 years ago

The pointer validity checking can produce misleading error messages in some cases. For example, a non-NULL but invalid pointer that has no associated pointer target information may be reported as "attempt to dereference a NULL pointer.", as in the following example where a non-pointer is implicitly cast to a pointer when passed to ctime():

time_t test;
time(&rawtime);
ctime(rawtime);

In this particular case the error should have been caught at compile time, but in general we should update the runtime errors reported from pointer checking to reflect whether the pointer is genuinely NULL or it simply has no known target.

mheinsen commented 8 years ago

I believe this was corrected by 17141377e9b5f00319d3f197361d6cf442681572 and 0fcc41468c5cedbcdd792b048d1222ee1951c6f7.