[LLVMbugs] [Bug 12685] New: static-analyzer fails to see exit() in function w/ varargs resulting in a false positive

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Fri Apr 27 08:34:02 PDT 2012


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

             Bug #: 12685
           Summary: static-analyzer fails to see exit() in function w/
                    varargs resulting in a false positive
           Product: new-bugs
           Version: unspecified
          Platform: Macintosh
        OS/Version: MacOS X
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: nega at icecube.umd.edu
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified


Created attachment 8467
  --> http://llvm.org/bugs/attachment.cgi?id=8467
sample code demonstrating the bug.

Using check-264.tar.bz2 from http://clang-analyzer.llvm.org/

In the attached code, the call to memcpy() on line 26 is clearly an error, but
is never reached because of the preceding call to die() on line 23.
'scan-build' flags line 26 as an error.

Changing the call to die() on link 23 to die0() results in the expected
behavior from scan-build; scan-build does not flag line 26 as an error.

Of course, declaring die() with "__attribute__ ((noreturn))" results in the
expected behavior; scan-build does not flag line 26 as an error.

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list