llvm-project/compiler-rt
Kristina Bessonova 5cfbfa035f [sanitizer_common] Fix SanitizerCommon.ChainedOriginDepotStats test
This test was failing with the following error message if to run the test binary
directly, w/o using lit:

  $ Sanitizer-x86_64-Test --gtest_filter=SanitizerCommon.ChainedOriginDepot*
  ...
  [ RUN      ] SanitizerCommon.ChainedOriginDepotStats
  compiler-rt/lib/sanitizer_common/tests/sanitizer_chained_origin_depot_test.cpp:77: Failure
  Expected: (stats1.allocated) > (stats0.allocated), actual: 196608 vs 196608
  [  FAILED  ] SanitizerCommon.ChainedOriginDepotStats (867 ms)

Since the ChainedOriginDepot* tests are not doing any cleanup, by the time
SanitizerCommon.ChainedOriginDepotStats test starts executing the depot
may not be empty, so there will be no allocation for the test.

This patch introduces ChainedOriginDepot::TestOnlyUnmap() API that deallocates
memory when requested. This makes sure underlying TwoLevelMap initiates
the expected allocation during the test.

Reviewed By: eugenis

Differential Revision: https://reviews.llvm.org/D127621
2022-06-16 11:59:58 +02:00
..
cmake Pass through even more LIBCXX_* variables to libfuzzer's custom lib++ 2022-06-15 19:05:29 -07:00
docs Prepare Compiler-RT for GnuInstallDirs, matching libcxx, document all 2021-07-13 15:21:41 +00:00
include [memprof] Initialize MemInfoBlock data. 2022-03-22 14:35:57 -07:00
lib [sanitizer_common] Fix SanitizerCommon.ChainedOriginDepotStats test 2022-06-16 11:59:58 +02:00
test Revert "[ASan] Use debuginfo for symbolization." 2022-06-15 23:42:46 +00:00
tools [GWP-ASan] Add inbuilt options parser. 2021-01-15 12:57:05 -08:00
unittests [Darwin] Limit parallelism for sanitizer tests that use shadow memory on AS 2022-03-31 14:43:28 -07:00
utils [compiler-rt] NFC: Fix trivial typo 2021-09-04 14:12:58 +05:30
www [compiler-rt] Remove forgotten mention of SVN modules, LLVM now uses Git. 2022-03-23 15:29:30 +01:00
.clang-tidy NFC: .clang-tidy: Inherit configs from parents to improve maintainability 2021-06-08 08:25:59 -07:00
.gitignore
CMakeLists.txt [CMake][compiler-rt] Provide a dedicated option for LLVM unwinder 2022-06-14 17:26:25 +00:00
CODE_OWNERS.TXT CODE_OWNERS: update information for builtins 2022-04-25 15:36:52 +00:00
CREDITS.TXT
LICENSE.TXT
README.txt

README.txt

Compiler-RT
================================

This directory and its subdirectories contain source code for the compiler
support routines.

Compiler-RT is open source software. You may freely distribute it under the
terms of the license agreement found in LICENSE.txt.

================================