[PATCH][Review request] unix.Malloc checker improvement: +handling new/delete, +memory.MismatchedFree, +memory.MismatchedDelete, +improved display names for allocators/deallocators

Anton Yartsev anton.yartsev at gmail.com
Mon Feb 11 21:19:18 PST 2013


Hi all,

the attached patch has three goals:
1) Bring handling of new/delete operators to the unix.Malloc checker.
This enables memory.LeakNeverReleased, memory.MultipleDelete, 
memory.DeallocateNonPtr and memory.LeakPtrValChanged checkers from the 
List of potential checkers 
<http://clang-analyzer.llvm.org/potential_checkers.html> to check memory 
allocated with new/delete. PR15237 
<http://llvm.org/bugs/show_bug.cgi?id=15237> created to track progress 
on the task.
2) Add memory.MismatchedFree and memory.MismatchedDelete checks. ( 
PR15238 <http://llvm.org/bugs/show_bug.cgi?id=15238> )
3) Display real allocator/deallocator names instead of hardcoded 
'malloc()' and 'free()' if possible.
Vital for 1) and 2)

please review

-- 
Anton

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130212/d8741260/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: MallocChecker.patch
Type: text/x-diff
Size: 22627 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130212/d8741260/attachment.patch>


More information about the cfe-commits mailing list