summaryrefslogtreecommitdiff
path: root/lib/hwasan
diff options
context:
space:
mode:
authorEvgeniy Stepanov <eugeni.stepanov@gmail.com>2019-02-28 20:43:24 +0000
committerEvgeniy Stepanov <eugeni.stepanov@gmail.com>2019-02-28 20:43:24 +0000
commitfe6f78eded2056fd0639536bbf10acb1cb7b583e (patch)
tree4cffa8aa40d05fbd498d7d037b02a9ad9b01c888 /lib/hwasan
parenta82e016db19f5104441752ab6ff26129857ab885 (diff)
downloadcompiler-rt-fe6f78eded2056fd0639536bbf10acb1cb7b583e.tar.gz
[hwasan] Fix vfork handling with large stack limit.
Remove the maximum stack cleanup size check. With ulimit -s unlimited main thread stack can be very large, but we don't really have a choice other than cleaning all of it. It should be reasonably fast - hwasan cleans large shadow ranges with a single madvise call. This change fixes check-hwasan after ulimit -s unlimited. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@355137 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/hwasan')
-rw-r--r--lib/hwasan/hwasan.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/hwasan/hwasan.cpp b/lib/hwasan/hwasan.cpp
index efcb311e0..d10318251 100644
--- a/lib/hwasan/hwasan.cpp
+++ b/lib/hwasan/hwasan.cpp
@@ -488,9 +488,7 @@ void __hwasan_handle_vfork(const void *sp_dst) {
CHECK(t);
uptr top = t->stack_top();
uptr bottom = t->stack_bottom();
- static const uptr kMaxExpectedCleanupSize = 64 << 20; // 64M
- if (top == 0 || bottom == 0 || sp < bottom || sp >= top ||
- sp - bottom > kMaxExpectedCleanupSize) {
+ if (top == 0 || bottom == 0 || sp < bottom || sp >= top) {
Report(
"WARNING: HWASan is ignoring requested __hwasan_handle_vfork: "
"stack top: %zx; current %zx; bottom: %zx \n"