[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
Thu Mar 7 15:53:23 PST 2013


On 07.03.2013 21:29, Jordan Rose wrote:
> On Mar 7, 2013, at 4:47 , Anton Yartsev <anton.yartsev at gmail.com> wrote:
>
>> On 06.03.2013 21:46, Anna Zaks wrote:
>>> CC-ing the patch author!
>>>
>>> Also,
>>>
>>> Could you split out the ObjC NoCopy + FreeWhenDone change into a separate patch. It does not seem to be directly related to the other changes. Also, I am not 100% sure what changes we are making there. One part is refactoring, however, you've also removed the check for the message calls from the doesNotFreeMemory(). Do we expect any behavior changes from this?
>>> (Sorry if I've missed something; the patch is getting big.)
>> Splitted ObjC NoCopy + FreeWhenDone change, kept changes in doesNotFreeMemory().
>> The logic of doesNotFreeMemory() was broken - it treated all 'NoCopy' and 'FreeWhenDone==1' methods as freeing memory and unknown to us. This lead to removal of RefState from the State and impossibility for further alloc/dealloc matching analysis.
> Can we just do the Objective-C part first? Can you send that patch too?
Attached. I'll update the main patch after this one gets in.

>> Have not found any suitable place in lib/Frontend/CompilerInvocation.cpp
>> Did you mean to update clang/lib/Driver/Tools.cpp ?
> Whoops, I grepped for "unix" and found the comment there. You're right, and that's the right change.

-- 
Anton

-------------- next part --------------
A non-text attachment was scrubbed...
Name: MallocCheckerRefactoring.patch
Type: text/x-diff
Size: 5487 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130308/818508a1/attachment.patch>


More information about the cfe-commits mailing list