We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8215060 commit b93629dCopy full SHA for b93629d
compiler-rt/lib/sanitizer_common/sanitizer_posix_libcdep.cpp
@@ -180,10 +180,9 @@ void SetAlternateSignalStack() {
180
// TODO(glider): the mapped stack should have the MAP_STACK flag in the
181
// future. It is not required by man 2 sigaltstack now (they're using
182
// malloc()).
183
- void *base = MmapOrDie(GetAltStackSize(), __func__);
184
- altstack.ss_sp = (char*) base;
185
- altstack.ss_flags = 0;
186
altstack.ss_size = GetAltStackSize();
+ altstack.ss_sp = (char *)MmapOrDie(altstack.ss_size, __func__);
+ altstack.ss_flags = 0;
187
CHECK_EQ(0, sigaltstack(&altstack, nullptr));
188
}
189
0 commit comments