projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8983db1
)
[NFC][asan] Use RoundDownTo
author
Vitaly Buka
<vitalybuka@google.com>
Wed, 20 Jul 2022 21:40:10 +0000
(14:40 -0700)
committer
Vitaly Buka
<vitalybuka@google.com>
Thu, 21 Jul 2022 01:50:44 +0000
(18:50 -0700)
compiler-rt/lib/asan/asan_interceptors.cpp
patch
|
blob
|
history
diff --git
a/compiler-rt/lib/asan/asan_interceptors.cpp
b/compiler-rt/lib/asan/asan_interceptors.cpp
index 6c843968f7af53142b5eaec9d3d10c77fcfcec4b..7cd8343465af077b46673828f775529d5ba6ffe8 100644
(file)
--- a/
compiler-rt/lib/asan/asan_interceptors.cpp
+++ b/
compiler-rt/lib/asan/asan_interceptors.cpp
@@
-245,7
+245,7
@@
DEFINE_REAL_PTHREAD_FUNCTIONS
static void ClearShadowMemoryForContextStack(uptr stack, uptr ssize) {
// Align to page size.
uptr PageSize = GetPageSizeCached();
- uptr bottom =
stack & ~(PageSize - 1
);
+ uptr bottom =
RoundDownTo(stack, PageSize
);
ssize += stack - bottom;
ssize = RoundUpTo(ssize, PageSize);
static const uptr kMaxSaneContextStackSize = 1 << 22; // 4 Mb