• 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
..
api Loading commit data...
asmjs Loading commit data...
assembler Loading commit data...
base Loading commit data...
compiler Loading commit data...
compiler-dispatcher Loading commit data...
heap Loading commit data...
interpreter Loading commit data...
libplatform Loading commit data...
parser Loading commit data...
torque Loading commit data...
wasm Loading commit data...
zone Loading commit data...
BUILD.gn Loading commit data...
DEPS Loading commit data...
allocation-unittest.cc Loading commit data...
background-compile-task-unittest.cc Loading commit data...
bigint-unittest.cc Loading commit data...
cancelable-tasks-unittest.cc Loading commit data...
char-predicates-unittest.cc Loading commit data...
code-stub-assembler-unittest.cc Loading commit data...
code-stub-assembler-unittest.h Loading commit data...
conversions-unittest.cc Loading commit data...
counters-unittest.cc Loading commit data...
detachable-vector-unittest.cc Loading commit data...
eh-frame-iterator-unittest.cc Loading commit data...
eh-frame-writer-unittest.cc Loading commit data...
locked-queue-unittest.cc Loading commit data...
microtask-queue-unittest.cc Loading commit data...
object-unittest.cc Loading commit data...
register-configuration-unittest.cc Loading commit data...
run-all-unittests.cc Loading commit data...
source-position-table-unittest.cc Loading commit data...
strings-storage-unittest.cc Loading commit data...
test-helpers.cc Loading commit data...
test-helpers.h Loading commit data...
test-utils.cc Loading commit data...
test-utils.h Loading commit data...
testcfg.py Loading commit data...
unicode-unittest.cc Loading commit data...
unittests.status Loading commit data...
utils-unittest.cc Loading commit data...
value-serializer-unittest.cc Loading commit data...