Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 93406da1 authored by Peter Collingbourne's avatar Peter Collingbourne Committed by Gerrit Code Review
Browse files

Merge "Run MTE tests on zero-sized allocations."

parents a9d1799d aa544796
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -475,7 +475,7 @@ TEST_P(GwpAsanCrasherTest, gwp_asan_uaf) {

struct SizeParamCrasherTest : CrasherTest, testing::WithParamInterface<size_t> {};

INSTANTIATE_TEST_SUITE_P(Sizes, SizeParamCrasherTest, testing::Values(16, 131072));
INSTANTIATE_TEST_SUITE_P(Sizes, SizeParamCrasherTest, testing::Values(0, 16, 131072));

TEST_P(SizeParamCrasherTest, mte_uaf) {
#if defined(__aarch64__)
@@ -483,6 +483,11 @@ TEST_P(SizeParamCrasherTest, mte_uaf) {
    GTEST_SKIP() << "Requires MTE";
  }

  // Any UAF on a zero-sized allocation will be out-of-bounds so it won't be reported.
  if (GetParam() == 0) {
    return;
  }

  int intercept_result;
  unique_fd output_fd;
  StartProcess([&]() {