This is an archive of the discontinued LLVM Phabricator instance.

[hwasan] Move RunFreeHooks call
ClosedPublic

Authored by Northbadge on May 22 2023, 1:45 PM.

Details

Summary

Ensures a subsequent call (via an external caller) to
__sanitizer_get_allocated_size via hooks will return a valid size.

This allows a faster version of __sanitizer_get_allocated_size
to be implemented, which can skip checks.

Test to ensure RunFreeHooks' call order will come with
__sanitizer_get_allocated_size_fast

Diff Detail

Event Timeline

Northbadge created this revision.May 22 2023, 1:45 PM
Herald added a project: Restricted Project. · View Herald TranscriptMay 22 2023, 1:45 PM
Herald added a subscriber: Enna1. · View Herald Transcript

Add newlines

Northbadge edited the summary of this revision. (Show Details)May 22 2023, 2:08 PM
Northbadge published this revision for review.May 22 2023, 6:06 PM
Northbadge added a reviewer: vitalybuka.
Herald added a project: Restricted Project. · View Herald TranscriptMay 22 2023, 6:07 PM
Herald added a subscriber: Restricted Project. · View Herald Transcript
vitalybuka accepted this revision.May 22 2023, 7:11 PM

What is the motivation? To make sure RunFreeHooks is called after CheckInvalidFree and ReportInvalidFree?

This revision is now accepted and ready to land.May 22 2023, 7:11 PM

What is the motivation? To make sure RunFreeHooks is called after CheckInvalidFree and ReportInvalidFree?

Yup, that’s correct

This revision was automatically updated to reflect the committed changes.