diff --git a/Utilities/Thread.cpp b/Utilities/Thread.cpp index 591414051c..717e6a7809 100644 --- a/Utilities/Thread.cpp +++ b/Utilities/Thread.cpp @@ -1813,7 +1813,11 @@ static LONG exception_filter(PEXCEPTION_POINTERS pExp) noexcept const bool s_exception_handler_set = []() -> bool { +#ifdef USE_ASAN + if (!AddVectoredExceptionHandler(FALSE, (PVECTORED_EXCEPTION_HANDLER)exception_handler)) +#else if (!AddVectoredExceptionHandler(1, (PVECTORED_EXCEPTION_HANDLER)exception_handler)) +#endif { report_fatal_error("AddVectoredExceptionHandler() failed."); }