projects
/
platform
/
upstream
/
gcc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
38aca14
)
ASAN: Support detect_invalid_pointer_pairs=1 with detect_stack_use_after_return=1
author
Martin Liska
<mliska@suse.cz>
Fri, 16 Oct 2020 13:08:52 +0000
(15:08 +0200)
committer
Martin Liska
<mliska@suse.cz>
Wed, 21 Oct 2020 07:27:08 +0000
(09:27 +0200)
Do not crash when AsanThread::GetStackVariableShadowStart does not find
a variable for a pointer on a shadow stack.
Cherry-pick from
ad2be02a833e56f7fe280797280b219eb3312621
.
Differential Revision: https://reviews.llvm.org/D89552
libsanitizer/asan/asan_thread.cpp
patch
|
blob
|
history
diff --git
a/libsanitizer/asan/asan_thread.cpp
b/libsanitizer/asan/asan_thread.cpp
index
f0df8bd
..
58cdc29
100644
(file)
--- a/
libsanitizer/asan/asan_thread.cpp
+++ b/
libsanitizer/asan/asan_thread.cpp
@@
-366,7
+366,9
@@
uptr AsanThread::GetStackVariableShadowStart(uptr addr) {
bottom = stack_bottom();
} else if (has_fake_stack()) {
bottom = fake_stack()->AddrIsInFakeStack(addr);
- CHECK(bottom);
+ if (bottom == 0) {
+ return 0;
+ }
} else {
return 0;
}