Coverity tool

Walter Bright newshound1 at digitalmars.com
Tue Feb 9 16:22:05 PST 2010


sybrandy wrote:
>>> - Use Before Test: here the bugs are in the code paths of the 
>>> try-except.
>>
>> Not sure what this means.
> 
> If I remember correctly from when I had an opportunity to look at these 
> types of tools, this is a case where, in C or C++, you have a variable 
> that may be uninitialized or set to NULL, but you don't test for it 
> until you have tried to use it.  I believe the root cause of this bug 
> has nothing to do with the language, but with people going back into 
> code they don't fully understand and trying to either A) use the 
> variable and not know that the check is in there or B) they put the 
> check in to "fix" a bug, but didn't put it in the correct spot.

That makes sense.


> Needless to say, with D setting variables to reasonable defaults, I 
> believe this is mitigated, but not entirely prevented.

You're right.



More information about the Digitalmars-d mailing list