• Jakob Kummerow's avatar
    [ubsan] Fix errors related to AsmType · 81becb8c
    Jakob Kummerow authored
    The AsmType class uses a design similar to the old Object* model, where
    arbitrary values (including 0) are reinterpret_cast to pointers. This
    yields the following UBSan error, among others:
    
        src/asmjs/asm-parser.cc:2000:51: runtime error: member call on null
        pointer of type 'v8::internal::wasm::AsmType'
    
    This patch does the smallest possible fix by turning the affected methods
    into static functions. Longer-term, we should consider switching the
    overall class design to a "struct wrapping an Address" model like the new
    Object definition, which is a bit non-trivial because some AsmType types
    are ZoneObject subclasses.
    
    Bug: v8:3770
    Change-Id: Ie2a7cdc9eab32c4c469d699212c84b0419480b4f
    Reviewed-on: https://chromium-review.googlesource.com/c/1397663Reviewed-by: 's avatarMichael Starzinger <mstarzinger@chromium.org>
    Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#58586}
    81becb8c
Name
Last commit
Last update
benchmarks Loading commit data...
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...
.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...
ChangeLog Loading commit data...
DEPS 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...
OWNERS Loading commit data...
PRESUBMIT.py Loading commit data...
README.md Loading commit data...
WATCHLISTS Loading commit data...
codereview.settings Loading commit data...
snapshot_toolchain.gni Loading commit data...