Skip to content

Commit 3b78716

Browse files
committed
[sanitizer] De-flake one test.
signal_segv_handler.cc occasionally fails due to a suspected kernel bug. Increasing the mapped region size seems to make the test pass reliably. llvm-svn: 242647
1 parent 764d6de commit 3b78716

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

compiler-rt/test/sanitizer_common/TestCases/Linux/signal_segv_handler.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@ int main() {
3232
a.sa_sigaction = handler;
3333
a.sa_flags = SA_SIGINFO;
3434
sigaction(SIGSEGV, &a, &old);
35-
guard = mmap(0, 4096, PROT_NONE, MAP_ANON | MAP_PRIVATE, -1, 0);
35+
guard = (char *)mmap(0, 3 * 4096, PROT_NONE, MAP_ANON | MAP_PRIVATE, -1, 0) +
36+
4096;
3637
for (int i = 0; i < 1000000; i++) {
3738
mprotect(guard, 4096, PROT_NONE);
3839
*(int*)guard = 1;

0 commit comments

Comments
 (0)