Skip to content

Commit f93c2b6

Browse files
committed
[sanitizer] Disable ASLR for release_shadow_space
On aarch64 with kernel 4.12.13 the test sporadically fails with RSS at start: 1564, after mmap: 103964, after mmap+set label: 308768, \ after fixed map: 206368, after another mmap+set label: 308768, after \ munmap: 206368 release_shadow_space.c.tmp: [...]/release_shadow_space.c:80: int \ main(int, char **): Assertion `after_fixed_mmap <= before + delta' failed. It seems on some executions the memory is not fully released, even after munmap. And it also seems that ASLR is hurting it by adding some fragmentation, by disabling it I could not reproduce the issue in multiple runs.
1 parent 771f0fb commit f93c2b6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

compiler-rt/test/dfsan/release_shadow_space.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
// DFSAN_OPTIONS=no_huge_pages_for_shadow=false RUN: %clang_dfsan %s -o %t && %run %t
2-
// DFSAN_OPTIONS=no_huge_pages_for_shadow=true RUN: %clang_dfsan %s -o %t && %run %t
1+
// DFSAN_OPTIONS=no_huge_pages_for_shadow=false RUN: %clang_dfsan %s -o %t && setarch `uname -m` -R %run %t
2+
// DFSAN_OPTIONS=no_huge_pages_for_shadow=true RUN: %clang_dfsan %s -o %t && setarch `uname -m` -R %run %t
33

44
#include <assert.h>
55
#include <sanitizer/dfsan_interface.h>

0 commit comments

Comments
 (0)