[LLVMbugs] [Bug 6776] New: false positive : bad bound guessing

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sun Apr 4 14:55:40 PDT 2010


           Summary: false positive : bad bound guessing
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Static Analyzer
        AssignedTo: kremenek at apple.com
        ReportedBy: castet.matthieu at free.fr
                CC: llvmbugs at cs.uiuc.edu

Created an attachment (id=4632)
 --> (http://llvm.org/bugs/attachment.cgi?id=4632)

In the attached test case, type can only be between 0 and 63 and c is always
set to 2.
This is because type come from (uint32_t)>>(32-(6))).

But analyser fails to see that :
test_ana.c:27:2: warning: Undefined or garbage value returned to caller

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