[cfe-dev] scan-build "No bugs found."

Laszlo Nagy via cfe-dev cfe-dev at lists.llvm.org
Wed Jan 18 05:30:43 PST 2017


Hi Jack,

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.


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.

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.

Regards,
Laszlo

On Wed, Jan 18, 2017 at 9:39 AM, Jack Bates via cfe-dev <
cfe-dev at lists.llvm.org> wrote:

> I'm running scan-build on Apache Traffic Server and getting "No bugs
> found.", which isn't what I expect.
>
> I ran it as follows:
>
>   $ git clone https://github.com/apache/trafficserver.git
>   $ cd trafficserver
>   $ autoreconf -i
>   $ ./configure
>   $ scan-build -v -v make V=1 2>&1 > ~/Desktop/scan-build
>
> Here's the output [1].
>
> 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.
>
> The output contains lines like the following, so I conclude that the
> analyzer is working?
>
>   ANALYZE (Syntax): ../../lib/ts/ink_mutex.h ~x_pthread_mutexattr_t
>
> And it contains lines like "1 warning generated.", so I conclude that
> there should be bugs?
>
> So my first question is, why are there "No bugs found."?
>
> 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?
>
> Thanks!
>
> [1] http://nottheoilrig.com/scan-build
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at lists.llvm.org
> http://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/20170119/0c5c1741/attachment.html>


More information about the cfe-dev mailing list