Questions tagged [coverity-prevent]

Coverity Prevent is a commercial static source code analyzer that looks for errors such as inconsistent NULL checks, dead code, unused return values, missing break statement, etc.

Coverity Prevent is the old name for Coverity Static Analysis, a commercial product produced by Coverity, Inc.

Coverity Static Analysis exists for C/C++, Java and C#. The analysis works on the AST rather than on the source code. The AST is generated by Coverity's compiler which observes the native compiler and then outputs the AST for the analysis phase emulating the behavior of the native compiler.

The analysis phase runs multiple "checkers" which look for common defects along multiple paths (excluding those which are not feasible at run-time).

Common problems with running Coverity Static Analysis would be errors from "cov-build" or "cov-analyze" steps. Those are best addressed with Coverity support or on Coverity Developer Forums (http://communities.coverity.com/)

Questions which may be of interest to general development communities would be discussions of why a particular piece of code was flagged as being incorrect or suboptimal.

In most cases, it will be necessary to provide sufficient context to make clear what the analysis is flagging - this would include the code flagged as well as all relevant definitions of types, etc.

There have already been extensive discussions about the benefits of Static Analysis tools and comparison of free and commercial offerings, but any completely new questions of that type could be appropriate candidates for this tag.

35 questions
1
vote
3 answers

What does HFA stand for in Coverity Prevent?

Coverity Prevent has a checker 'HFA' which is used to identify unused included header files. I understand what it's used for, but I don't understand the abbreviation. What does HFA stand for? It doesn't appear to be mentioned in the documentation…
Klelky
  • 404
  • 1
  • 7
  • 15
1
vote
1 answer

Can I filter my Coverity filename results using something like a regex?

I'm working with Coverity and I'd like to filter my filename results in my view in a regex style. Is there anything more sophisticated available in coverity apart from: ? - Any single character * - Any group of characters Which is somewhat…
Rob
  • 335
  • 8
  • 23
1
vote
1 answer

Coverity Set Up (Cygwin Warning)?

I am currently trying to run Coverity Prevent and I believe I have everything set up appropriately on my windows 7 build machine. I have run it with AnthillPro and when my code finishes and gets to Coverity it says that everything was built fine…
Redman76
  • 35
  • 1
  • 7
0
votes
0 answers

New Coverity user, scan failing with "last build status: failed"

I am trying to use the free version of coverity scan on a python repo, but it returns the error: "Last Build Status: Failed - No further action needed.. Your build will be added back to the queue for analysis". I have created a project in Coverity…
0
votes
3 answers

backing up coverity PostgreSQL database to file

We have the "coverity" tool setup and are trying to find a way to backup the database to a file, it uses I believe PostgreSQL. How can we do this, is it using its own independent installation of PostgreSQL?
user391986
  • 29,536
  • 39
  • 126
  • 205
0
votes
1 answer

Coverity Scan for JS

I have initiated the Coverity scan for the JS using Coverity Wizards. The capture build step has been completed & failed in to Run analysis step. The failed message is "failed with error code 8. See console for details. Some of your source code may…
0
votes
1 answer

Coverity analysis shows error with const type. How to resolve this?

When I am running Coverity analysis shows error in function below. void initalizeStatement(sqlite3* db, const char* query) { // statement shall not be reuesed! if (_valid) _valid = false; else { sqlite3_stmt* stmt = NULL; …
Soumyajit Roy
  • 463
  • 2
  • 8
  • 17
0
votes
1 answer

How can I handle the below coverity scan issue Parameter docId receives the tainted data (taint_path_param)

Please find my code snippet. @RequestMapping(value="/abc" , Method=RequetMethod.GET) public void xxx(@Requestparam("docId") final String docId , @Requestparam("archieveId") final String archieveId){ //Code will be here } How can I resolve the…
pa_One
  • 35
  • 1
  • 2
  • 11
0
votes
4 answers

Resource leak during object creation

I have the following code for creation of a node inside a graph. I'm getting resource leak error when I run a static checking tool (coverity). I would appreciate if you can point out how to improve the code: class node { public : …
cppcoder
  • 1,194
  • 4
  • 16
  • 30
0
votes
1 answer

what is difference betwen REVERSE_INULL and FORWARD_NULL error in coverity scan(static code analysis)?

when i run coverity scan on python code (static code analysis), REVERSE_INULL and FORWARD_NULL error are detected. can anyone tell what is difference between REVERSE_INULL and FORWARD_NULL ? why these error are detected.
sneha patil
  • 9
  • 1
  • 8
0
votes
1 answer

How to change STACK_USE value in coverity tool for C++?

Coverity is reporting warning for stack size usage of 10k bytes. I want to change this value to <25k> bytes. How can i configure it in coverity ? plz help
naren
  • 49
  • 9
0
votes
0 answers

Coverity integration issues with Jenkins

On trying to integrate Coverity with Jenkins and setting up the Integrity manager instances on Jenkins, I see the following error being reported : Connected successfully, but Coverity web services were not detected. This appears to be the Ajax…
0
votes
2 answers

Coverity static analysis for C programs

I am new to Static analysis tool and I am trying to build a simple checker. When I am throwing a OUTPUT_ERROR, I am also getting some more details with tags like "cond_true" etc. Is there a way I can stub these and print only the error I want to…
user3260022
  • 69
  • 2
  • 8
0
votes
1 answer

Coverity SA - excluding boost, stlport errors

The defects discovered by coverity SA including errors of STLPort, Boost, Qt libs as well, Is there any way to exclude these errors while running cov-build or cov-analyze?
Shrikant
  • 744
  • 8
  • 18
0
votes
1 answer

How to Initialise an instance of GUITHREADINFO

I have declared the following GUITHREADINFO gui; The Coverity complains that gui is not initialised. Can you please tell me how do I initialise it? Best Regards Chintan
chintan s
  • 6,170
  • 16
  • 53
  • 86