Windows: don't compile HandleHeapCorruption on ASAN

f145b54e8378c8e2bd1fbb427684ca9b4c54ea9c put the only reference to this
in a non-ASAN block, so we're hitting an unused function warning rolling
into Chromium

Bug: crashpad:464
Change-Id: I225debd48a255aa5214e02a6821dcd72c618f141
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/4939552
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Leonard Grey <lgrey@chromium.org>
This commit is contained in:
Leonard Grey 2023-10-13 16:38:27 -04:00 committed by Crashpad LUCI CQ
parent 2f6cffa676
commit 63ec9482cf

View File

@ -187,6 +187,7 @@ LONG WINAPI UnhandledExceptionHandler(EXCEPTION_POINTERS* exception_pointers) {
return EXCEPTION_CONTINUE_SEARCH; return EXCEPTION_CONTINUE_SEARCH;
} }
#if !defined(ADDRESS_SANITIZER)
LONG WINAPI HandleHeapCorruption(EXCEPTION_POINTERS* exception_pointers) { LONG WINAPI HandleHeapCorruption(EXCEPTION_POINTERS* exception_pointers) {
if (exception_pointers->ExceptionRecord->ExceptionCode == if (exception_pointers->ExceptionRecord->ExceptionCode ==
STATUS_HEAP_CORRUPTION) { STATUS_HEAP_CORRUPTION) {
@ -195,6 +196,7 @@ LONG WINAPI HandleHeapCorruption(EXCEPTION_POINTERS* exception_pointers) {
return EXCEPTION_CONTINUE_SEARCH; return EXCEPTION_CONTINUE_SEARCH;
} }
#endif
void HandleAbortSignal(int signum) { void HandleAbortSignal(int signum) {
DCHECK_EQ(signum, SIGABRT); DCHECK_EQ(signum, SIGABRT);