[UBSan] Temporarily disable UBSan for snapshot and minidump

UBSan was reporting reference binding to a misaligned address in Fuchsia.
Disable UBSan for this target for now just to silence the runtime
warnings, then come back and fix them.

Bug: fuchsia:46805
Change-Id: Ic5d9b35161b6d998f1ff50eb8e978c44aff9b4ef
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/2068051
Reviewed-by: Scott Graham <scottmg@chromium.org>
Commit-Queue: Scott Graham <scottmg@chromium.org>
This commit is contained in:
Leonard Chan 2020-02-21 11:33:02 -08:00 committed by Commit Bot
parent f79cba47ba
commit 0c20aeabd3
3 changed files with 15 additions and 0 deletions

View File

@ -20,6 +20,17 @@ config("crashpad_config") {
include_dirs = [ "." ]
}
# TODO(fuchsia:46805): Remove this once instances of UB have been cleaned up.
config("disable_ubsan") {
if (crashpad_is_in_fuchsia) {
cflags = [ "-fno-sanitize=undefined" ]
}
visibility = [
"snapshot:snapshot",
"minidump:minidump_test",
]
}
if (crashpad_is_in_chromium || crashpad_is_in_fuchsia) {
test("crashpad_tests") {
deps = [

View File

@ -164,4 +164,6 @@ source_set("minidump_test") {
if (crashpad_is_win) {
cflags = [ "/wd4201" ] # nonstandard extension used : nameless struct/union
}
configs += [ "..:disable_ubsan" ]
}

View File

@ -234,6 +234,8 @@ static_library("snapshot") {
cflags = [ "/wd4201" ] # nonstandard extension used : nameless struct/union
libs = [ "powrprof.lib" ]
}
configs += [ "..:disable_ubsan" ]
}
if (crashpad_is_linux) {