• Igor Sheludko's avatar
    [ptr-compr][ubsan] Introduce UnalignedSlot<T> - unaligned pointer adapter · 123ca158
    Igor Sheludko authored
    ... which can be used with STL algorithms.
    
    When pointer compression is enabled the [u]intptr_t and double fields are
    only kTaggedSize aligned so in order to avoid undefined behavior in C++ code
    we have to access these values in an unaligned pointer friendly way although
    both x64 and arm64 architectures (where pointer compression is supported)
    allow unaligned access.
    
    These changes will be removed once v8:8875 is fixed and all the
    kSystemPointerSize fields are properly aligned.
    
    Bug: v8:7703
    Change-Id: If581fc00d63ae759c73b2a0f115331eea336605f
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1528995Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
    Commit-Queue: Michael Achenbach <machenbach@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#60319}
    123ca158
slots-atomic-inl.h 3.4 KB