[compiler-rt] b93629d - Address D100645 comment
Vitaly Buka via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 16 11:29:35 PDT 2021
Author: Vitaly Buka
Date: 2021-04-16T11:28:41-07:00
New Revision: b93629dd335ffee2fc4b9b619bf86c3f9e6b0023
URL: https://github.com/llvm/llvm-project/commit/b93629dd335ffee2fc4b9b619bf86c3f9e6b0023
DIFF: https://github.com/llvm/llvm-project/commit/b93629dd335ffee2fc4b9b619bf86c3f9e6b0023.diff
LOG: Address D100645 comment
Added:
Modified:
compiler-rt/lib/sanitizer_common/sanitizer_posix_libcdep.cpp
Removed:
################################################################################
diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_posix_libcdep.cpp b/compiler-rt/lib/sanitizer_common/sanitizer_posix_libcdep.cpp
index 2b10bdd37293..7ff48c35851e 100644
--- a/compiler-rt/lib/sanitizer_common/sanitizer_posix_libcdep.cpp
+++ b/compiler-rt/lib/sanitizer_common/sanitizer_posix_libcdep.cpp
@@ -180,10 +180,9 @@ void SetAlternateSignalStack() {
// TODO(glider): the mapped stack should have the MAP_STACK flag in the
// future. It is not required by man 2 sigaltstack now (they're using
// malloc()).
- void *base = MmapOrDie(GetAltStackSize(), __func__);
- altstack.ss_sp = (char*) base;
- altstack.ss_flags = 0;
altstack.ss_size = GetAltStackSize();
+ altstack.ss_sp = (char *)MmapOrDie(altstack.ss_size, __func__);
+ altstack.ss_flags = 0;
CHECK_EQ(0, sigaltstack(&altstack, nullptr));
}
More information about the llvm-commits
mailing list