[all-commits] [llvm/llvm-project] 1fb6a0: [scudo] Add unmapTestOnly() to secondary.

Mitch Phillips via All-commits all-commits at lists.llvm.org
Mon May 24 16:15:48 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 1fb6a0307240b0c543ec5babb35e39db2c39052b
      https://github.com/llvm/llvm-project/commit/1fb6a0307240b0c543ec5babb35e39db2c39052b
  Author: Mitch Phillips <31459023+hctim at users.noreply.github.com>
  Date:   2021-05-24 (Mon, 24 May 2021)

  Changed paths:
    M compiler-rt/lib/scudo/standalone/combined.h
    M compiler-rt/lib/scudo/standalone/secondary.h
    M compiler-rt/lib/scudo/standalone/tests/secondary_test.cpp

  Log Message:
  -----------
  [scudo] Add unmapTestOnly() to secondary.

When trying to track down a vaddr-poisoning bug, I found that that the
secondary cache isn't emptied on test teardown. We should probably do
that to make the tests hermetic. Otherwise, repeating the tests lots of
times using --gtest_repeat fails after the mmap vaddr space is
exhausted.

To repro:
$ ninja check-scudo_standalone # build
$ ./projects/compiler-rt/lib/scudo/standalone/tests/ScudoUnitTest-x86_64-Test \
--gtest_filter=ScudoSecondaryTest.*:-ScudoSecondaryTest.SecondaryCombinations \
--gtest_repeat=10000

Reviewed By: cryptoad

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




More information about the All-commits mailing list