Bug 1449337: Don't take the first VectoredExceptionHandler slot away from ASan. r=Jamie

This commit is contained in:
David Major 2018-03-29 10:18:14 -04:00
parent 7e1a91f21c
commit 40c8e34acf

View File

@ -275,8 +275,12 @@ Compatibility::Init()
// The vectored exception handler allows us to catch exceptions ahead of any
// SEH handlers.
if (!sVectoredExceptionHandler) {
// We need to let ASan's ShadowExceptionHandler remain in the firstHandler
// position, otherwise we'll get infinite recursion when our handler
// faults on shadow memory.
const ULONG firstHandler = FALSE;
sVectoredExceptionHandler =
AddVectoredExceptionHandler(TRUE, &DetectInSendMessageExCompat);
AddVectoredExceptionHandler(firstHandler, &DetectInSendMessageExCompat);
}
}
}