This is an archive of the discontinued LLVM Phabricator instance.

[memprof][NFC] Fix mismatched-new-delete in memprof tests
ClosedPublic

Authored by Enna1 on Dec 20 2021, 2:45 AM.

Details

Summary

Fix mismatched-new-delete in memprof test_new_load_store.cpp and test_terse.cpp

Diff Detail

Event Timeline

Enna1 requested review of this revision.Dec 20 2021, 2:45 AM
Enna1 created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptDec 20 2021, 2:45 AM
Herald added a subscriber: Restricted Project. · View Herald Transcript
snehasish accepted this revision.Dec 20 2021, 10:55 AM

The memprof interceptor implementation unifies the logic for delete and delete[] and the size parameter passed to Deallocate is ignored [1]. Without memprof instrumentation this is undefined behaviour so updating it to the appropriate delete lgtm.

[1] https://git.io/JDF9Q

This revision is now accepted and ready to land.Dec 20 2021, 10:55 AM
Enna1 added a comment.Dec 20 2021, 5:09 PM

Thanks @snehasish !
Can you commit this on my behalf cause I don't have commit access, thanks!

This revision was landed with ongoing or failed builds.Dec 20 2021, 6:43 PM
This revision was automatically updated to reflect the committed changes.

Looks like @vitalybuka got to this before I did, thanks for committing the change and also thanks for the fix @Enna1 !