HomePhabricator

scudo: Adjust test to use correct check for primary allocations.

Authored by pcc on Dec 16 2020, 11:24 AM.

Description

scudo: Adjust test to use correct check for primary allocations.

canAllocate() does not take into account the header size so it does
not return the right answer in borderline cases. There was already
code handling this correctly in isTaggedAllocation() so split it out
into a separate function and call it from the test.

Furthermore the test was incorrect when MTE is enabled because MTE
does not pattern fill primary allocations. Fix it.

Differential Revision: https://reviews.llvm.org/D93437

Details

Committed
pccDec 17 2020, 10:42 AM
Differential Revision
D93437: scudo: Adjust test to use correct check for primary allocations.
Parents
rGa48172cf1c15: Add brief description of dialects doc section.
Branches
Unknown
Tags
Unknown