forked from OSchip/llvm-project
Add another sanity check for swapcontext, which is currently unsupported. Patch by Alexey Samsonov!
llvm-svn: 233413
This commit is contained in:
parent
bceb2a5a1c
commit
816e0eabb7
|
@ -290,7 +290,7 @@ static void ClearShadowMemoryForContextStack(uptr stack, uptr ssize) {
|
|||
ssize += stack - bottom;
|
||||
ssize = RoundUpTo(ssize, PageSize);
|
||||
static const uptr kMaxSaneContextStackSize = 1 << 22; // 4 Mb
|
||||
if (ssize && ssize <= kMaxSaneContextStackSize) {
|
||||
if (AddrIsInMem(bottom) && ssize && ssize <= kMaxSaneContextStackSize) {
|
||||
PoisonShadow(bottom, ssize, 0);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue