[cfe-dev] [analyzer] Any real projects for testing Static Analyzer?

Denis Petrov via cfe-dev cfe-dev at lists.llvm.org
Thu May 14 12:06:16 PDT 2020


BTW,


I am trying to get a report from tinyxml2 (https://github.com/leethomason/tinyxml2) project running:
scan-build -stats -o . --use-analyzer=<path>\clang.exe make

preliminarily adding next `devision by zero` function to tinyxml2.cpp? file .

int f(bool is)
{
  int x = 0;
  int y = x;
  int z = 0;
  if(y == 0)
  {
    z = 12 / x;
  }
  return z;
}

But the result is:

scan-build: Analysis run complete.
scan-build: Removing directory '<path>/tinyxml2-master/build/2020-05-14-215742-2708-1' because it contains no reports.
scan-build: No bugs found.


What am ?I doing wrong?


________________________________
Denys Petrov
Senior ?++ Developer | Kharkiv, Ukraine

________________________________
??: Gábor Márton <martongabesz at gmail.com>
??????????: 13 ??? 2020 ?. 19:40
????: Denis Petrov
?????: cfe-dev
????: Re: [cfe-dev] [analyzer] Any real projects for testing Static Analyzer?

CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.  If you suspect potential phishing or spam email, report it to ReportSpam at accesssoftek.com
Hi Denis,

I am using csa-testbanch<https://github.com/Xazax-hun/csa-testbench> to test the performance and stability of my patches. It can aggregate the analyzer statistics and provides really nice charts. Under the hood it uses CodeChecker<https://github.com/Ericsson/codechecker/>.
The usual projects I run the tests are (in increasing complexity for the analyzer):

  *   tmux
  *   curl
  *   redis
  *   xerces
  *   bitcoin
  *   protobuf

Here are two example configurations that I use for the testbanch:

  *   C projects<https://github.com/Ericsson/clang-jenkins/blob/master/jenkins_home/c_projects_jenkins.json>
  *   C++ projects<https://github.com/Ericsson/clang-jenkins/blob/master/jenkins_home/cpp_projects_jenkins.json>

Note, these config files describe how to build the projects and what kind of parameters to add to each analyzer invocations.

Cheers,
Gabor

On Wed, May 13, 2020 at 1:37 PM Denis Petrov via cfe-dev <cfe-dev at lists.llvm.org<mailto:cfe-dev at lists.llvm.org>> wrote:

Hi, all.


What (open) projects do you use to test CSA (features, performance, etc.)?

I was trying to find any, but it is harder then I thought. I'm using Windows and many projects use posix includes.


My aim is to test performance of my patch. Or maybe somebody could do this for me :).


________________________________
Denys Petrov
Senior ?++ Developer | Kharkiv, Ukraine

_______________________________________________
cfe-dev mailing list
cfe-dev at lists.llvm.org<mailto:cfe-dev at lists.llvm.org>
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20200514/c20a560e/attachment.html>


More information about the cfe-dev mailing list