Bug 1314169: Leave the first VectoredExceptionHandler slot open for ASan. r=luke

Win64 ASan relies on a VectoredExceptionHandler to create shadow memory regions on demand. If WasmFaultHandler gets the exception first, it can itself fault while looking at shadow memory, leading to an infinite recursion.

MozReview-Commit-ID: 5MVik7kftxX

--HG--
extra : rebase_source : 10d281ad977af4de6890ad85e308500362f7b11e
This commit is contained in:
David Major 2016-11-10 15:00:52 -06:00
parent 1f55e2d522
commit c1bd147f5e

View File

@ -1340,7 +1340,8 @@ ProcessHasSignalHandlers()
// Install a SIGSEGV handler to handle safely-out-of-bounds asm.js heap
// access and/or unaligned accesses.
# if defined(XP_WIN)
if (!AddVectoredExceptionHandler(/* FirstHandler = */ true, WasmFaultHandler))
// FirstHandler must be false to avoid a conflict with ASan's fault handler
if (!AddVectoredExceptionHandler(/* FirstHandler = */ false, WasmFaultHandler))
return false;
# elif defined(XP_DARWIN)
// OSX handles seg faults via the Mach exception handler above, so don't