[LLVMbugs] [Bug 2518] New: scan-build treats -[NSAutoreleasePool drain] as -[ NSAutoreleasePool release]
bugzilla-daemon at cs.uiuc.edu
bugzilla-daemon at cs.uiuc.edu
Thu Jul 3 21:42:23 PDT 2008
http://llvm.org/bugs/show_bug.cgi?id=2518
Summary: scan-build treats -[NSAutoreleasePool drain] as -
[NSAutoreleasePool release]
Product: clang
Version: unspecified
Platform: Macintosh
OS/Version: MacOS X
Status: NEW
Severity: normal
Priority: P2
Component: Semantic Analyzer
AssignedTo: unassignedbugs at nondot.org
ReportedBy: rix.rob at gmail.com
CC: llvmbugs at cs.uiuc.edu
This was found with the common idiom of having an autorelease pool around a
loop:
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
while(…) {
…do some stuff…
[pool drain];
}
[pool release];
In this example, scan-build will report Use-After-Release bugs on [pool drain]
(for the second pass through the loop) and on [pool release] (after a single
pass through the loop).
--
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