Skip to content

Commit 6849934

Browse files
author
git apple-llvm automerger
committed
Merge commit '2e9f36d6d443' from apple/main into swift/next
2 parents 057054a + 2e9f36d commit 6849934

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

compiler-rt/lib/asan/asan_thread.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,9 @@ uptr AsanThread::GetStackVariableShadowStart(uptr addr) {
366366
bottom = stack_bottom();
367367
} else if (has_fake_stack()) {
368368
bottom = fake_stack()->AddrIsInFakeStack(addr);
369-
CHECK(bottom);
369+
if (bottom == 0) {
370+
return 0;
371+
}
370372
} else {
371373
return 0;
372374
}

compiler-rt/test/asan/TestCases/invalid-pointer-pairs-subtract-success.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// RUN: %clangxx_asan -O0 %s -o %t -mllvm -asan-detect-invalid-pointer-pair
22

33
// RUN: %env_asan_opts=detect_invalid_pointer_pairs=2 %run %t
4+
// RUN: %env_asan_opts=detect_invalid_pointer_pairs=2,detect_stack_use_after_return=1 %run %t
45

56
#include <assert.h>
67
#include <stdlib.h>

0 commit comments

Comments
 (0)