This is an archive of the discontinued LLVM Phabricator instance.

[scudo] Support allocating in the allocations hooks
Needs ReviewPublic

Authored by chelfi on May 25 2023, 7:43 AM.

Details

Reviewers
Chia-hungDuan
Summary

Update post-allocation and pre-deallocation hooks' contracts to
explictly support allocations. This is a comment-only change, because
the hooks are already called in such a way that, provided the hooks'
implementations take care to avoid infinite recursions, allocating is
safe.

This change also adds a unit test to prove that the current
implementation matches the new contract, and to prevent future
regressions.

Diff Detail

Event Timeline

chelfi created this revision.May 25 2023, 7:43 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 25 2023, 7:43 AM
chelfi requested review of this revision.May 25 2023, 7:43 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 25 2023, 7:43 AM
Herald added a subscriber: Restricted Project. · View Herald Transcript
chelfi updated this revision to Diff 525674.May 25 2023, 9:50 AM
  • Fix typo in attribute.
  • Additional checks that the reentrancy guard is exercised.