[LLVMbugs] [Bug 8184] New: Analyser does not understand __attribute__((cleanup))

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sun Sep 19 04:06:32 PDT 2010


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

           Summary: Analyser does not understand __attribute__((cleanup))
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: Static Analyzer
        AssignedTo: kremenek at apple.com
        ReportedBy: csdavec at swan.ac.uk
                CC: llvmbugs at cs.uiuc.edu


For exception-safe destruction of Objective-C objects, we use a macro that
declares them using __attribute__((cleanup)) with a cleanup function that sends
a -release message.  This ensures that the object is freed when the function
exits, either normally or via unwinding.  The analyser, however, does not take
the cleanup function into account and so reports a leak for every variable
declared in this way.

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