From: George Balatsouras Date: Thu, 15 Apr 2021 23:49:54 +0000 (-0700) Subject: [dfsan] Remove hard-coded constant in release_shadow_space.c X-Git-Tag: llvmorg-14-init~9429 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=98b114d4804e6a0b45dfd2ed25a7fb3e6120d918;p=platform%2Fupstream%2Fllvm.git [dfsan] Remove hard-coded constant in release_shadow_space.c Reviewed By: stephan.yichao.zhao Differential Revision: https://reviews.llvm.org/D100608 --- 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);