[LLVMbugs] [Bug 10863] New: False positives related to while loops in a threaded environment (Value stored to '...' during its initialization is never read)

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Sep 5 00:59:39 PDT 2011


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

           Summary: False positives related to while loops in a threaded
                    environment (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 while loops in a threaded environment. Below is a
code
snippet for which I get "Value stored to 'first' during its initialization is
never read" in a large projet:

-----------------
bool first = true;

while( this->m_continue ) {
  // some mutex
  if( first ) {
    first = false;
    foo();
  }
  else {
    bar();
  }
}
-----------------

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