Commit 5f4de1c7 authored by Etienne Bergeron's avatar Etienne Bergeron Committed by Commit Bot

Fix an infinite loop with ASAN instrumented build on windows.

The vector exception code used by chrome is incompatible with ASAN 64.
The following patch is commenting out the code when ASAN is present.

See comment in the code for details.

R=rnk@chromium.org, siggi@chromium.org, inferno@chromium.org

Bug: 783296
Change-Id: I8dbe192e658225840fe2249e99d9b84b518f558b
Reviewed-on: https://chromium-review.googlesource.com/782399
Commit-Queue: Etienne Bergeron <etienneb@chromium.org>
Commit-Queue: Abhishek Arya <inferno@chromium.org>
Reviewed-by: default avatarSigurður Ásgeirsson <siggi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#518354}
parent 149eed97
......@@ -65,6 +65,14 @@ void SetStabilityDataInt(base::StringPiece name, int64_t value) {
}
void RegisterStabilityVEH() {
#if defined(ADDRESS_SANITIZER) || defined(SYZYASAN)
// ASAN on windows x64 is dynamically allocating the shadow memory on a
// memory access violation by setting up an vector exception handler.
// When instrumented with ASAN, this code may trigger an exception by
// accessing unallocated shadow memory, which is causing an infinite
// recursion (i.e. infinite memory access violation).
(void)&VectoredExceptionHandler;
#else
// Register a vectored exception handler and request it be first. Note that
// subsequent registrations may also request to be first, in which case this
// one will be bumped.
......@@ -74,6 +82,7 @@ void RegisterStabilityVEH() {
static VehHandle veh_handler(
::AddVectoredExceptionHandler(1, &VectoredExceptionHandler));
DCHECK(veh_handler);
#endif // ADDRESS_SANITIZER
}
} // namespace browser_watcher
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment