Skip to content

Commit b93629d

Browse files
committed
Address D100645 comment
1 parent 8215060 commit b93629d

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

compiler-rt/lib/sanitizer_common/sanitizer_posix_libcdep.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -180,10 +180,9 @@ void SetAlternateSignalStack() {
180180
// TODO(glider): the mapped stack should have the MAP_STACK flag in the
181181
// future. It is not required by man 2 sigaltstack now (they're using
182182
// malloc()).
183-
void *base = MmapOrDie(GetAltStackSize(), __func__);
184-
altstack.ss_sp = (char*) base;
185-
altstack.ss_flags = 0;
186183
altstack.ss_size = GetAltStackSize();
184+
altstack.ss_sp = (char *)MmapOrDie(altstack.ss_size, __func__);
185+
altstack.ss_flags = 0;
187186
CHECK_EQ(0, sigaltstack(&altstack, nullptr));
188187
}
189188

0 commit comments

Comments
 (0)