Skip to content

Commit

Permalink
deps: V8: backport 3a75c1f
Browse files Browse the repository at this point in the history
Original commit message:

    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}

Refs: v8/v8@3a75c1f

Backport-PR-URL: #28005
PR-URL: #27375
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Ujjwal Sharma <[email protected]>
Reviewed-By: Refael Ackermann <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
  • Loading branch information
refack authored and targos committed Jun 4, 2019
1 parent bb729a4 commit e4aa869
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions common.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@

# Reset this number to 0 on major V8 upgrades.
# Increment by one for each non-official patch applied to deps/v8.
'v8_embedder_string': '-node.12',
'v8_embedder_string': '-node.13',

##### V8 defaults for Node.js #####

Expand Down Expand Up @@ -70,7 +70,7 @@
# https://github.com/nodejs/node/pull/22920/files#r222779926
'v8_enable_fast_mksnapshot': 0,

'v8_win64_unwinding_info': 0,
'v8_win64_unwinding_info': 1,

# TODO(refack): make v8-perfetto happen
'v8_use_perfetto': 0,
Expand Down
2 changes: 1 addition & 1 deletion deps/v8/src/unwinding-info-win64.cc
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ extern "C" int CRASH_HANDLER_FUNCTION_NAME(
EXCEPTION_POINTERS info = {ExceptionRecord, ContextRecord};
return unhandled_exception_callback_g(&info);
}
return EXCEPTION_CONTINUE_SEARCH;
return ExceptionContinueSearch;
}

static constexpr int kMaxExceptionThunkSize = 12;
Expand Down

0 comments on commit e4aa869

Please sign in to comment.