[LLVMbugs] [Bug 11636] New: Double-release from ARC when inlining C functions
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Wed Dec 21 12:18:44 PST 2011
http://llvm.org/bugs/show_bug.cgi?id=11636
Bug #: 11636
Summary: Double-release from ARC when inlining C functions
Product: clang
Version: 3.0
Platform: Macintosh
OS/Version: MacOS X
Status: NEW
Severity: normal
Priority: P
Component: -New Bugs
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: paul.q.stevenson at gmail.com
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
Created attachment 7785
--> http://llvm.org/bugs/attachment.cgi?id=7785
Source file that generates a double release
The attached file generates a double release when compiled with -O2 and
inlining InlineCFunc inside CFunc. The problem can't be reproduced with pure
objc code due to the lack of inlining.
In the example code, when InlineCFunc() returns false, label 20 is taken which
releases the object and then calls the .critedge cleanup code, which also
releases the object. When InlineCFunc() returns true, .critedge is jumped to
directly, resulting in just a single release.
This is about as minimal a reproduction of the original problem as I can manage
- simplifying this example in any way seems to stop the double-release from
being generated.
--
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