Dereference of null ptrs after an ERR has been executed

Jeff Latimer lats at yless4u.com.au
Fri Jan 11 03:43:21 CST 2008


What is the policy for handling the dereferencing of pointers that have 
previously been determined to be NULL and an ERR message has been 
issued.  It seems that there are many cases where Coverity has found 
that the test is made but the code falls through to the dereference.  In 
a number of cases to a TRACE.  Are we trying to throw an exception in 
these cases but assuming that the problem is unlikely and not worth 
further handling.  Essentially, it seems that if this is the policy then 
we can mark the Coverity entries as ignore.  In some cases it seems that 
the only problem may be the TRACE and there is no other reference which 
implies that an else may solve the problem ie.

if (!ptr) ERR "msg"
else TRACE

The other solution is to get the Coverity people to recognise the 
circumstance and not report it.

Jeff



More information about the wine-devel mailing list