[all-commits] [llvm/llvm-project] e22d80: scudo: Adjust test to use correct check for primar...

pcc via All-commits all-commits at lists.llvm.org
Thu Dec 17 10:46:55 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: e22d802e587b8954748e2b2193195a946ba105e8
      https://github.com/llvm/llvm-project/commit/e22d802e587b8954748e2b2193195a946ba105e8
  Author: Peter Collingbourne <peter at pcc.me.uk>
  Date:   2020-12-17 (Thu, 17 Dec 2020)

  Changed paths:
    M compiler-rt/lib/scudo/standalone/tests/combined_test.cpp

  Log Message:
  -----------
  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




More information about the All-commits mailing list