Click here to Skip to main content
15,890,185 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: Coverity Scan for Visual Studio / C++ Pin
Greg Utas13-May-20 2:12
professionalGreg Utas13-May-20 2:12 
GeneralRe: Coverity Scan for Visual Studio / C++ Pin
Stuart Dootson13-May-20 2:38
professionalStuart Dootson13-May-20 2:38 
GeneralRe: Coverity Scan for Visual Studio / C++ Pin
Greg Utas13-May-20 2:54
professionalGreg Utas13-May-20 2:54 
GeneralRe: Coverity Scan for Visual Studio / C++ Pin
Greg Utas13-May-20 3:09
professionalGreg Utas13-May-20 3:09 
GeneralRe: Coverity Scan for Visual Studio / C++ Pin
Stuart Dootson13-May-20 3:22
professionalStuart Dootson13-May-20 3:22 
GeneralRe: Coverity Scan for Visual Studio / C++ Pin
kalberts13-May-20 3:51
kalberts13-May-20 3:51 
GeneralRe: Coverity Scan for Visual Studio / C++ Pin
Stuart Dootson13-May-20 4:47
professionalStuart Dootson13-May-20 4:47 
GeneralRe: Coverity Scan for Visual Studio / C++ Pin
kalberts13-May-20 5:25
kalberts13-May-20 5:25 
I would be suprised if Coverity was flawless Smile | :)

From your description it seems like something I would raise as a support case (becauses we pay for support... Smile | :) ). But before that, I would check one thing: I have notices that the visibilty of a function can strongly affect which issues are raised. For a symbol (such as a function name) that is globally visible, the analysis must assume that any (syntactically legal) argument value may be supplied. For a private function, where all callers and calls are known, the analysis can ascertain that some code will never be called. (If that was the case here, Coverity would have flagged the entire if-statement as unreachable code - it is very good at that.)

In the general case, that exception may be thrown; the code is definitely reachable (from other calls, with other _State values) - you can't delete it. But for your specific call, with one specific _State value, the traceback should have been aborted and no issue raised.

The question is: Did the analyzer actually analyze the clear() source code? For the desktop analysis, it analyzes modified source lines only; for the rest, it uses the information from the previous complete analysis (somewhat similar to a referecded dotNet assembly: You have all the interface information, including an exception list, but none of the internal code flow). If it "knows" from earlier analysis results that clear() may raise an exception, it draw a fast conclusion from that.

I would be curious to know if you get the same result from a tabula rasa complete analysis, with all source code supplied, clear() inclusive. If your run was done as a desktop incremental analysis, I wouldn't be surprised if a full analysis did detect that the exception could not be reached in the specific call you make. The quick and dirty incremental analysis sure is quick compared to the full works, but it sometimes is a little dirty as well Smile | :) .

Or maybe we should say: Make it as fast as possible, but no faster. The problem is that if you demand all the qualities of a full analysis but performed on your desktop, it will be no faster that a full analysis.
GeneralRe: Coverity Scan for Visual Studio / C++ Pin
User 4041113-May-20 20:41
User 4041113-May-20 20:41 
GeneralRe: Coverity Scan for Visual Studio / C++ Pin
Greg Utas14-May-20 0:17
professionalGreg Utas14-May-20 0:17 
GeneralMessage Closed Pin
14-May-20 0:25
User 4041114-May-20 0:25 
GeneralRe: Coverity Scan for Visual Studio / C++ Pin
Greg Utas14-May-20 0:33
professionalGreg Utas14-May-20 0:33 
GeneralSo I am a little depressed by my COVID lockdown weight gain... PinPopular
DRHuff12-May-20 5:47
DRHuff12-May-20 5:47 
GeneralRe: So I am a little depressed by my COVID lockdown weight gain... Pin
den2k8812-May-20 5:51
professionalden2k8812-May-20 5:51 
GeneralRe: So I am a little depressed by my COVID lockdown weight gain... Pin
Mike Hankey12-May-20 6:13
mveMike Hankey12-May-20 6:13 
GeneralRe: So I am a little depressed by my COVID lockdown weight gain... Pin
lopatir12-May-20 7:08
lopatir12-May-20 7:08 
GeneralRe: So I am a little depressed by my COVID lockdown weight gain... Pin
Mike Hankey12-May-20 7:19
mveMike Hankey12-May-20 7:19 
GeneralRe: So I am a little depressed by my COVID lockdown weight gain... Pin
lopatir12-May-20 7:24
lopatir12-May-20 7:24 
GeneralRe: So I am a little depressed by my COVID lockdown weight gain... Pin
Mike Hankey12-May-20 7:59
mveMike Hankey12-May-20 7:59 
GeneralRe: So I am a little depressed by my COVID lockdown weight gain... Pin
Slacker00712-May-20 6:32
professionalSlacker00712-May-20 6:32 
JokeRe: So I am a little depressed by my COVID lockdown weight gain... Pin
PIEBALDconsult12-May-20 12:27
mvePIEBALDconsult12-May-20 12:27 
GeneralThought of the Day Pin
OriginalGriff12-May-20 4:46
mveOriginalGriff12-May-20 4:46 
GeneralRe: Thought of the Day Pin
Tim Deveaux12-May-20 4:49
Tim Deveaux12-May-20 4:49 
GeneralRe: Thought of the Day Pin
Mike Hankey12-May-20 4:49
mveMike Hankey12-May-20 4:49 
GeneralRe: Thought of the Day Pin
Daniel Pfeffer12-May-20 4:57
professionalDaniel Pfeffer12-May-20 4:57 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.