• Seth Brenith's avatar
    Fix JSEntry unwinding data on Windows ARM64 · cdf8925e
    Seth Brenith authored
    The current unwinding data for JSEntry correctly restores the frame
    pointer and program counter from the caller frame, which might or might
    not be sufficient to continue unwinding, depending on the contents of
    that caller frame. Currently, the cctest StackUnwindingWin64 is broken
    (at least with my build config) because the caller frame also needs the
    stack pointer, which is not restored correctly.
    
    In particular, I see this xdata for v8::internal::GeneratedCode<...>,
    which is the function that calls Builtins_JSEntry:
    
    10400015 : 2 code words, 1 epilog, function length=15
    01000012 : epilog starts at 12 and its unwind handler starts at 4
    e405c8d2 : save_reg x=b z=8
               alloc_s x=5
               end
    e405c8d2 : same thing but for the epilog
    
    The prolog that corresponds to the unwind codes above is:
    
    sub sp, sp, #50
    str lr, [sp, #0x40]
    
    Note that it does not set fp, so unwinding requires an accurate sp.
    
    This change emits slightly more complicated unwinding data for JSEntry
    so that the frame pointer, stack pointer, and program counter can all be
    restored.
    
    Change-Id: I0c7f3eba97ef64408f46631b487c4b0ceb06fa9b
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1848860
    Commit-Queue: Seth Brenith <seth.brenith@microsoft.com>
    Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
    Reviewed-by: 's avatarMichael Starzinger <mstarzinger@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#64435}
    cdf8925e
Name
Last commit
Last update
..
api Loading commit data...
asmjs Loading commit data...
ast Loading commit data...
base Loading commit data...
builtins Loading commit data...
codegen Loading commit data...
common Loading commit data...
compiler Loading commit data...
compiler-dispatcher Loading commit data...
d8 Loading commit data...
date Loading commit data...
debug Loading commit data...
deoptimizer Loading commit data...
diagnostics Loading commit data...
execution Loading commit data...
extensions Loading commit data...
flags Loading commit data...
handles Loading commit data...
heap Loading commit data...
ic Loading commit data...
init Loading commit data...
inspector Loading commit data...
interpreter Loading commit data...
json Loading commit data...
libplatform Loading commit data...
libsampler Loading commit data...
logging Loading commit data...
numbers Loading commit data...
objects Loading commit data...
parsing Loading commit data...
profiler Loading commit data...
protobuf Loading commit data...
regexp Loading commit data...
roots Loading commit data...
runtime Loading commit data...
sanitizer Loading commit data...
snapshot Loading commit data...
strings Loading commit data...
tasks Loading commit data...
third_party Loading commit data...
torque Loading commit data...
tracing Loading commit data...
trap-handler Loading commit data...
utils Loading commit data...
wasm Loading commit data...
zone Loading commit data...
DEPS Loading commit data...
OWNERS Loading commit data...