This is an archive of the discontinued LLVM Phabricator instance.

[hwasan] do not check if freed pointer belonged to allocator.
ClosedPublic

Authored by fmayer on Aug 19 2021, 9:08 AM.

Details

Summary

In that case it is very likely that there will be a tag mismatch anyway.

We handle the case that the pointer belongs to neither of the allocators
by getting a nullptr from allocator.GetBlockBegin.

Diff Detail

Event Timeline

fmayer requested review of this revision.Aug 19 2021, 9:08 AM
fmayer created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptAug 19 2021, 9:08 AM
Herald added a subscriber: Restricted Project. · View Herald Transcript
eugenis accepted this revision.Aug 19 2021, 12:01 PM
eugenis added a subscriber: eugenis.

LGTM

This revision is now accepted and ready to land.Aug 19 2021, 12:01 PM
hctim accepted this revision.Aug 19 2021, 1:29 PM

This seems to break tests: http://45.33.8.238/linux/54105/step_10.txt

Any idea what's going wrong there?

(@pcc too)

This revision is now accepted and ready to land.Aug 20 2021, 4:22 AM
fmayer updated this revision to Diff 368080.Aug 23 2021, 6:05 AM

non-app memory is always invalid free.

fmayer updated this revision to Diff 368091.Aug 23 2021, 6:42 AM

fix MemIsApp

Please take another look. Fixed the test failure.

fmayer updated this revision to Diff 368105.Aug 23 2021, 7:34 AM

clang format

eugenis accepted this revision.Aug 24 2021, 2:19 PM

LGTM