[build] Suppress UBSan alignment checks in pointer compression

It is a design decision of pointer compression to allow unaligned pointers,
so disable this check in UBSan.

Bug: v8:7703
Change-Id: I3fab34e77ad755cdef3cd385a3615e3d0e350c16
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1523346
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60235}
This commit is contained in:
Leszek Swirski 2019-03-14 11:06:04 +01:00 committed by Commit Bot
parent ba6f813c2d
commit 6861278461

View File

@ -667,6 +667,11 @@ config("toolchain") {
# Chromium uses a hand-picked subset of UBSan coverage. We want everything.
if (is_ubsan) {
cflags += [ "-fsanitize=undefined" ]
if (v8_enable_pointer_compression) {
# ... except alignment checks when using pointer compression, as it can
# lead to unaligned pointer accesses.
cflags += [ "-fno-sanitize=alignment" ]
}
}
}