[cfe-dev] Expected behaviour of the analyzer with alpha.unix.Stream checker.
marco.grossi at studenti.unipr.it
Tue Feb 26 10:26:35 PST 2013
Thank you Jordan for your clarifications.
With the suggested way:
> /tmp/build/Debug+Asserts/bin/clang++ --analyze -Xclang
I'm still seeing the nondeterminism.
On 02/26/2013 06:31 PM, Jordan Rose wrote:
> Hi, Marco. Non-determinism is always considered a bug in the analyzer. However, running the analyzer through the -cc1 interface is unstable and deliberately unsupported; at the very least, you need to include the 'core' checkers yourself when you run with -cc1 (-analyzer-checker=core).
> The usual way to run the analyzer with a custom checker enabled is like this:
>> clang++ --analyze -Xclang -analyzer-checker=alpha.unix.Stream test__alpha_unix_Stream.cc
> With the core checkers enabled, do you still see this nondeterminism?
> P.S. Of course, the alpha checkers are marked "alpha" for a reason—they're checkers we feel are not ready for broad use beause they haven't been thoroughly tested. You may well have found a real bug.
> On Feb 26, 2013, at 7:48 , Marco Grossi <marco.grossi at studenti.unipr.it> wrote:
>> Hi All,
>> I've a question regarding the non-deterministic results that I encounter applying the analyzer on the attached test case.
>> Command executed(here without search paths for includefile):
>> /tmp/build/Debug+Asserts/bin/clang++ -cc1 -analyze -analyzer-store region test__alpha_unix_Stream.cc -analyze-function main -analyzer-checker=alpha.unix.Stream
>> $ /tmp/build/Debug+Asserts/bin/clang++ -v
>> clang version 3.3 (trunk 176090)
>> Target: x86_64-unknown-linux-gnu
>> Thread model: posix
>> Sometimes the run does not report bug, and sometime report:
>> test__alpha_unix_Stream.cc:28:3: warning: Opened File never closed. Potential Resource leak
>> I cannot understand if this is the expected behaviour, or mine mistake on analyzer's invocation, or a bug in the alpha.unix.Stream checker or elsewhere.
>> cfe-dev mailing list
>> cfe-dev at cs.uiuc.edu
More information about the cfe-dev