[LLVMbugs] [Bug 10862] New: False positives related to try catch blocks (Value stored to '...' during its initialization is never read)

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Sep 5 00:13:43 PDT 2011


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

           Summary: False positives related to try catch blocks (Value
                    stored to '...' during its initialization is never
                    read)
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Static Analyzer
        AssignedTo: kremenek at apple.com
        ReportedBy: tom.vercauteren at gmail.com
                CC: llvmbugs at cs.uiuc.edu


Hi,

I am using scan-build (svn from 2011-09-02) to analyze c++ code and get a few
false positives related to try catch blocks. My initial attempts to make a
small test case did not succeed in replicating the bug. Below are two code
snippets for which I get "Value stored to 'status' during its initialization is
never read" in a large projet:

-----------------
uint32_t status = info.refStatus;

try {
  status = foo();
}
catch(...) {
}

bar(status);
-----------------

-----------------
int status = this->m_status;
this->m_status = foo();
try {
  bar();
}
catch(...) {
  this->m_status = status;
}
-----------------

-- 
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