v8/test
Leszek Swirski 9f6ddb48a0 Revert "V8 x64 backend doesn't emit ABI compliant stack frames"
This reverts commit 3cda21de77.

Reason for revert: Breaks the roll on Windows (see https://cr-buildbucket.appspot.com/build/8918477701097622400)

Original change's description:
> V8 x64 backend doesn't emit ABI compliant stack frames
> 
> On 64 bit Windows, the OS stack walking does not work because the V8 x64
> backend doesn't emit unwinding info and also because it doesn't emit ABI
> compliant stack frames. See
> https://docs.google.com/document/d/1-wf50jFlii0c_Pr52lm2ZU-49m220nhYMrHDi3vXnh0/edit
> for more details.
> 
> This problem can be fixed by observing that V8 frames usually all have the same
> prolog and epilog:
> 
> push rbp,
> mov rbp, rsp
> ...
> pop rbp
> ret N
> 
> and that it is possible to define XDATA (UNWIND_CODEs) that specify how Windows
> should walk through V8 frames. Furthermore, since V8 Code objects are all
> allocated in the same code-range for an Isolate, it is possible to register a
> single PDATA/XDATA entry to cover stack walking for all the code generated
> inside that code-range.
> 
> This PR contains changes required to enable stack walking on Win64:
> 
> EmbeddedFileWriter now adds assembler directives to the builtins
> snapshot source file (embedded.cc) to emit additional entries in the .pdata and
> in the .xdata section of the V8 executable. This takes care of stack walking
> for embedded builtins. (The case of non-embedded builtins is not supported).
> The x64 Assembler has been modified to collect the information required to emit
> this unwind info for builtins.
> 
> Stack walking for jitted code is handled is Isolate.cpp, by registering
> dynamically PDATA/XDATA for the whole code-range address space every time a new
> Isolate is initialized, and by unregistering them when the Isolate is
> destroyed.
> 
> Stack walking for WASM jitted code is handled is the same way in
> wasm::NativeModule (wasm/wasm-code-manager.cpp).
> 
> It is important to note that Crashpad and Breakpad are already registering
> PDATA/XDATA to manage and report unhandled exceptions (but not for embedded
> builtins). Since it is not possible to register multiple PDATA entries for the
> same address range, a new function is added to the V8 API:
> SetUnhandledExceptionCallback() can be used by an embedder to register its own
> unhandled exception handler for exceptions that arise in v8-generated code.
> V8 embedders should be modified accordingly (code for this is in a separate PR
> in the Chromium repository:
> https://chromium-review.googlesource.com/c/chromium/src/+/1474703).
> 
> All these changes are experimental, behind:
> 
> the 'v8_win64_unwinding_info' build flag, and
> the '--win64-unwinding-info' runtime flag.
> 
> Bug: v8:3598
> Change-Id: Iea455ab6d0e2bf1c556aa1cf870841d44ab6e4b1
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1469329
> Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
> Reviewed-by: Jakob Gruber <jgruber@chromium.org>
> Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
> Commit-Queue: Paolo Severini <paolosev@microsoft.com>
> Cr-Commit-Position: refs/heads/master@{#60330}

TBR=bbudge@chromium.org,ulan@chromium.org,mvstanton@chromium.org,mstarzinger@chromium.org,gdeepti@chromium.org,jgruber@chromium.org,paolosev@microsoft.com

Change-Id: If8470da94c58df8c800cbe8887f9f86236e43353
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:3598
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1532321
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60372}
2019-03-20 14:36:04 +00:00
..
benchmarks Reland "Preparing v8 to use with python3 /test" 2019-03-20 09:56:06 +00:00
cctest Revert "V8 x64 backend doesn't emit ABI compliant stack frames" 2019-03-20 14:36:04 +00:00
common [wasm-hint] Unit Test for Wasm Compilation Hints Decoder 2019-03-20 10:49:46 +00:00
debugger [nojit] Auto-skip --opt tests in jitless mode 2019-03-06 12:45:17 +00:00
fuzzer [wasm][fuzzer] Run micro tasks after each fuzzer execution 2019-03-15 14:23:45 +00:00
inspector Reland "[inspector] Allow limiting the total size of collected scripts." 2019-03-16 06:08:17 +00:00
intl [Intl] Fix special case timezone 2019-03-07 23:33:22 +00:00
js-perf-test Revert "[js-perf-test] Add more WeakMap perf tests" 2019-03-20 09:51:25 +00:00
memory [snapshot] Remove the builtins snapshot 2018-10-31 10:18:28 +00:00
message [fni] Mark computed props as computed, not anonymous function 2019-03-01 20:52:03 +00:00
mjsunit Revert "[wasm][anyref] Add support of call-indirect for multiple tables" 2019-03-20 11:52:37 +00:00
mkgrokdump Make mkgrokdump depend on the page size 2019-03-18 17:49:48 +00:00
mozilla Reland "Preparing v8 to use with python3 /test" 2019-03-20 09:56:06 +00:00
preparser [test] Don't test jitless without embedded-builtins 2019-02-26 14:33:01 +00:00
test262 Reland "Preparing v8 to use with python3 /test" 2019-03-20 09:56:06 +00:00
torque [torque] Simplify class and struct construction 2019-02-27 17:36:37 +00:00
unittests [wasm] Split adding code from publishing it 2019-03-20 13:39:11 +00:00
wasm-js [testrunner] handle timeout param in file 2019-02-27 17:49:17 +00:00
wasm-spec-tests [wasm] Update spec tests 2019-02-27 10:42:02 +00:00
webkit [test] Don't test jitless without embedded-builtins 2019-02-26 14:33:01 +00:00
BUILD.gn Add target for common test headers 2019-02-12 09:30:01 +00:00
OWNERS Make tmrts an infra OWNER 2019-02-15 09:02:24 +00:00