Skip to content

Commit 3a75c1f

Browse files
paolosevMSFTCommit Bot
authored andcommitted
Fixing a possible freeze on abort with 'v8_win64_unwinding_info'
Win64 unwind data can specify a language-specific handler function which is called as part of the search for an exception handler, as described in https://docs.microsoft.com/en-us/cpp/build/exception-handling-x64?view=vs-2019. This is used for example by Crashpad to register its own exception handler for exceptions in V8-generated code. There is a problem in the code that may cause a freeze on abort: in file \deps\v8\src\unwinding-info-win64.cc in function CRASH_HANDLER_FUNCTION_NAME the line: return EXCEPTION_CONTINUE_SEARCH; should be return ExceptionContinueSearch; These constants are both used in the context of Win32 exception handlers, but they have different semantics and unfortunately different values: EXCEPTION_CONTINUE_SEARCH (=0) should be returned by an exception filter while a language-specific handler should return an EXCEPTION_DISPOSITION value, and more precisely ExceptionContinueSearch (=1) in this case. Bug: v8:9295 Change-Id: I1a3aaabf357e52a909611814f1ea013cf652ae06 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1629795 Reviewed-by: Jakob Kummerow <[email protected]> Commit-Queue: Paolo Severini <[email protected]> Cr-Commit-Position: refs/heads/master@{#61867}
1 parent 53c3d74 commit 3a75c1f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/diagnostics/unwinding-info-win64.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ extern "C" __declspec(dllexport) int CRASH_HANDLER_FUNCTION_NAME(
107107
EXCEPTION_POINTERS info = {ExceptionRecord, ContextRecord};
108108
return unhandled_exception_callback_g(&info);
109109
}
110-
return EXCEPTION_CONTINUE_SEARCH;
110+
return ExceptionContinueSearch;
111111
}
112112

113113
static constexpr int kMaxExceptionThunkSize = 12;

0 commit comments

Comments
 (0)