This is an archive of the discontinued LLVM Phabricator instance.

[NFC][hwasan] Don't tag secondary allocations on free
ClosedPublic

Authored by vitalybuka on Jul 25 2023, 5:09 PM.

Details

Summary

OnUnmap will tag it to zero anyway.

Diff Detail

Event Timeline

vitalybuka created this revision.Jul 25 2023, 5:09 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 25 2023, 5:09 PM
Herald added a subscriber: Enna1. · View Herald Transcript
vitalybuka requested review of this revision.Jul 25 2023, 5:09 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 25 2023, 5:09 PM
Herald added a subscriber: Restricted Project. · View Herald Transcript
fmayer added inline comments.Jul 25 2023, 5:13 PM
compiler-rt/lib/hwasan/hwasan_allocator.cpp
378

can we put a debug assert that it's untagged here?

Also nit: typo in commit message.

vitalybuka retitled this revision from [NFC][hwasan] Don't tag sacondary allocations on free to [NFC][hwasan] Don't tag secondary allocations on free.Jul 26 2023, 1:26 PM
vitalybuka added inline comments.Jul 26 2023, 1:33 PM
compiler-rt/lib/hwasan/hwasan_allocator.cpp
378

We can't, as soon we call Deallocate, another thread can pick up the memory.

fmayer accepted this revision.Jul 26 2023, 1:34 PM
This revision is now accepted and ready to land.Jul 26 2023, 1:34 PM
This revision was landed with ongoing or failed builds.Jul 26 2023, 1:36 PM
This revision was automatically updated to reflect the committed changes.