• 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
build_overrides Loading commit data...
custom_deps Loading commit data...
docs Loading commit data...
gni Loading commit data...
include Loading commit data...
infra Loading commit data...
samples Loading commit data...
src Loading commit data...
test Loading commit data...
testing Loading commit data...
third_party Loading commit data...
tools Loading commit data...
.clang-format Loading commit data...
.clang-tidy Loading commit data...
.editorconfig Loading commit data...
.flake8 Loading commit data...
.git-blame-ignore-revs Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
.gn Loading commit data...
.vpython Loading commit data...
.ycm_extra_conf.py Loading commit data...
AUTHORS Loading commit data...
BUILD.gn Loading commit data...
CODE_OF_CONDUCT.md Loading commit data...
COMMON_OWNERS Loading commit data...
ChangeLog Loading commit data...
DEPS Loading commit data...
ENG_REVIEW_OWNERS Loading commit data...
INFRA_OWNERS Loading commit data...
INTL_OWNERS Loading commit data...
LICENSE Loading commit data...
LICENSE.fdlibm Loading commit data...
LICENSE.strongtalk Loading commit data...
LICENSE.v8 Loading commit data...
LICENSE.valgrind Loading commit data...
MIPS_OWNERS Loading commit data...
OWNERS Loading commit data...
PPC_OWNERS Loading commit data...
PRESUBMIT.py Loading commit data...
README.md Loading commit data...
S390_OWNERS Loading commit data...
WATCHLISTS Loading commit data...
codereview.settings Loading commit data...