[LLVMbugs] [Bug 2701] New: LLVM/Clang Static Analyzer 0.79: reported memory leak ( in GC mode) is false positive

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Thu Aug 21 09:26:22 PDT 2008


           Summary: LLVM/Clang Static Analyzer 0.79: reported memory leak
                    (in GC mode) is false positive
           Product: new-bugs
           Version: unspecified
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: new bugs
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: sean at rogue-research.com
                CC: llvmbugs at cs.uiuc.edu

Created an attachment (id=1943)
 --> (http://llvm.org/bugs/attachment.cgi?id=1943)
Test project to repro.

My code uses the open source AMSerialPort library, and the static analyzer
reports a memory leak that I am fairly sure is a false positive. 
Interestingly, it only reports this when garbage collection is turned on, not
when it is off.

See attached html and xcode project to repro.

Basically, the code 1) creates a dict with CFDictionaryCreateMutableCopy 2)
calls IOServiceAddMatchingNotification(), which is documented to reduce the
retain count.

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