[LLVMbugs] [Bug 12307] New: ARC Double-release in if/then statement in @finally with -O2

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Mar 19 11:56:26 PDT 2012


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

             Bug #: 12307
           Summary: ARC Double-release in if/then statement in @finally
                    with -O2
           Product: clang
           Version: trunk
          Platform: Macintosh
        OS/Version: MacOS X
            Status: NEW
          Severity: normal
          Priority: P
         Component: LLVM Codegen
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: paul.q.stevenson at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified


Created attachment 8236
  --> http://llvm.org/bugs/attachment.cgi?id=8236
Test case for ARC bug

The attached code results in an additional release on the WrappedObject
instance when compiled with -fobjc-arc -O2 on the current trunk (svn revision
153042)

The essential elements of the crash appear to be:

- a finally block

- an object O that is returned from a method called at the start of the finally
block

- a function call after the method call that returned O

- an if/then statement, both arms of which make use of O

The problem does not occur with -fobjc-arc-exceptions

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