[LLVMbugs] [Bug 12800] New: Should warn on double-free when NSData consumes a reference to a malloc buffer
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Fri May 11 09:51:20 PDT 2012
http://llvm.org/bugs/show_bug.cgi?id=12800
Bug #: 12800
Summary: Should warn on double-free when NSData consumes a
reference to a malloc buffer
Product: clang
Version: trunk
Platform: Macintosh
OS/Version: Windows XP
Status: NEW
Severity: enhancement
Priority: P
Component: Static Analyzer
AssignedTo: kremenek at apple.com
ReportedBy: tjw at me.com
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
Created attachment 8536
--> http://llvm.org/bugs/attachment.cgi?id=8536
example
If you malloc() a buffer and pass it to -[NSData initWithBytesNoCopy:length:],
clang-sa realizes that the method takes the responsibility of calling free().
If you later call free() on that buffer, clang-sa should warn about a
double-free().
clang version 3.2 (trunk 156620)
Target: x86_64-apple-darwin11.3.0
Thread model: posix
--
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