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: [email protected]
ReportedBy: [email protected]
CC: [email protected]
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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs