From 98b114d4804e6a0b45dfd2ed25a7fb3e6120d918 Mon Sep 17 00:00:00 2001 From: George Balatsouras Date: Thu, 15 Apr 2021 16:49:54 -0700 Subject: [PATCH] [dfsan] Remove hard-coded constant in release_shadow_space.c Reviewed By: stephan.yichao.zhao Differential Revision: https://reviews.llvm.org/D100608 --- compiler-rt/test/dfsan/release_shadow_space.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler-rt/test/dfsan/release_shadow_space.c b/compiler-rt/test/dfsan/release_shadow_space.c index 8b05034..a1253ef 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); -- 2.7.4