<div dir="ltr"><div><div>Hi Jack,<br><br></div>was following your recipe to analyze the traffic server. Was using the scan-build-py and scan-build from Clang source repo. Both was leaving me a non empty report directory with 22 bug reports.<br><br><br></div><div>And `scan-build` is designed to run through `configure` too. It does not have a huge cost to do, so should not be an issue. But this case I agree, the generated makefiles are respecting the `CC` and `CXX` variables, therefore the interposition works.<br><br></div><div>About the redirection problem. I don't know the answer. But I know a workaround it. If you use the `intercept-build` and `analyze-build` from scan-build-py, you can separate the interception phase from the actual static analyzer runs. And when you run `analyze-build` that can be redirected without this problem.<br><br></div><div>Regards,<br></div><div>Laszlo<br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jan 18, 2017 at 9:39 AM, Jack Bates via cfe-dev <span dir="ltr"><<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I'm running scan-build on Apache Traffic Server and getting "No bugs found.", which isn't what I expect.<br>
<br>
I ran it as follows:<br>
<br>
$ git clone <a href="https://github.com/apache/trafficserver.git" rel="noreferrer" target="_blank">https://github.com/apache/traf<wbr>ficserver.git</a><br>
$ cd trafficserver<br>
$ autoreconf -i<br>
$ ./configure<br>
$ scan-build -v -v make V=1 2>&1 > ~/Desktop/scan-build<br>
<br>
Here's the output [1].<br>
<br>
I didn't run ./configure through scan-build, but I conclude from the Make output that the compiler is being correctly interposed upon, so I shouldn't need to? The output indicates that the compiler is c++-analyzer.<br>
<br>
The output contains lines like the following, so I conclude that the analyzer is working?<br>
<br>
ANALYZE (Syntax): ../../lib/ts/ink_mutex.h ~x_pthread_mutexattr_t<br>
<br>
And it contains lines like "1 warning generated.", so I conclude that there should be bugs?<br>
<br>
So my first question is, why are there "No bugs found."?<br>
<br>
Also, although I redirect both stdout and stderr, the lines I mentioned -- "ANALYZE ..." and "1 warning generated." -- are nonetheless printed on the console, not [1]. Why is that?<br>
<br>
Thanks!<br>
<br>
[1] <a href="http://nottheoilrig.com/scan-build" rel="noreferrer" target="_blank">http://nottheoilrig.com/scan-b<wbr>uild</a><br>
______________________________<wbr>_________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/cfe-dev</a><br>
</blockquote></div><br></div>