This is an archive of the discontinued LLVM Phabricator instance.

[HWASAN] Remove FindHeapChunkByAddressFastLocked
ClosedPublic

Authored by kstoimenov on Jan 18 2023, 10:31 AM.

Diff Detail

Event Timeline

kstoimenov created this revision.Jan 18 2023, 10:31 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 18 2023, 10:31 AM
Herald added a subscriber: Enna1. · View Herald Transcript
kstoimenov requested review of this revision.Jan 18 2023, 10:31 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 18 2023, 10:31 AM
Herald added a subscriber: Restricted Project. · View Herald Transcript

Fixed build.

Simplfied code.

vitalybuka accepted this revision.Jan 18 2023, 11:23 AM
vitalybuka added inline comments.
compiler-rt/lib/hwasan/hwasan_allocator.cpp
524

Sorry, I didn't expect action for you now, it's rather note for the future.
And looks FIXME is incorrect.

My concern was actually about LargeMmapAllocator::GetBlockBeginFastLocked called from __hwasan::allocator.GetBlockBeginFastLocked.
I looked into the code. and it's very different from LargeMmapAllocator::GetBlockBegin.

LargeMmapAllocator::GetBlockBegin is O(N)
LargeMmapAllocator::GetBlockBeginFastLocked is O(Nlog(N)), but if called on suspended process, the sorting should happen just once, so O(log(n))

So nothing to FIXME here.

But the patch is LGTM

This revision is now accepted and ready to land.Jan 18 2023, 11:23 AM
This revision was landed with ongoing or failed builds.Jan 18 2023, 3:33 PM
This revision was automatically updated to reflect the committed changes.