http://llvm.org/bugs/show_bug.cgi?id=17538

            Bug ID: 17538
           Summary: Invalid analysis path
           Product: clang
           Version: unspecified
          Hardware: Macintosh
                OS: MacOS X
            Status: NEW
          Severity: normal
          Priority: P
         Component: Static Analyzer
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]
    Classification: Unclassified

Created attachment 11357
  --> http://llvm.org/bugs/attachment.cgi?id=11357&action=edit
Source showing problem

Version 275 of the Mac OS X checker gives an incorrect "null dereference" error
on the attached source.  Just run "checker-275/scan-build c++ -c
invalidpath.cpp"
and look at the path it analyzed.

It took a path where retValue.Success was false, but then immediately went down
a
patch where it was true, which is impossible.

The really weird part is that if you swap the first 2 lines in the "foo"
function, the error isn't reported.

Another weirdness is that retValue is initialized in such a way that
retValue.Success is true so that the path where it assumed it was false is not
possible either.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to