[compiler-rt] 98b114d - [dfsan] Remove hard-coded constant in release_shadow_space.c
George Balatsouras via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 15 17:25:19 PDT 2021
Author: George Balatsouras
Date: 2021-04-15T17:24:35-07:00
New Revision: 98b114d4804e6a0b45dfd2ed25a7fb3e6120d918
URL: https://github.com/llvm/llvm-project/commit/98b114d4804e6a0b45dfd2ed25a7fb3e6120d918
DIFF: https://github.com/llvm/llvm-project/commit/98b114d4804e6a0b45dfd2ed25a7fb3e6120d918.diff
LOG: [dfsan] Remove hard-coded constant in release_shadow_space.c
Reviewed By: stephan.yichao.zhao
Differential Revision: https://reviews.llvm.org/D100608
Added:
Modified:
compiler-rt/test/dfsan/release_shadow_space.c
Removed:
################################################################################
diff --git a/compiler-rt/test/dfsan/release_shadow_space.c b/compiler-rt/test/dfsan/release_shadow_space.c
index 8b050345d0b6e..a1253ef87416b 100644
--- a/compiler-rt/test/dfsan/release_shadow_space.c
+++ b/compiler-rt/test/dfsan/release_shadow_space.c
@@ -69,7 +69,7 @@ int main(int argc, char **argv) {
after_mmap_and_set_label2, after_munmap);
const size_t mmap_cost_kb = map_size >> 10;
- const size_t mmap_shadow_cost_kb = 2 * mmap_cost_kb;
+ const size_t mmap_shadow_cost_kb = sizeof(dfsan_label) * mmap_cost_kb;
assert(after_mmap >= before + mmap_cost_kb);
assert(after_mmap_and_set_label >= after_mmap + mmap_shadow_cost_kb);
assert(after_mmap_and_set_label2 >= before + mmap_cost_kb + mmap_shadow_cost_kb);
More information about the llvm-commits
mailing list