From 499bc0318d40efa7da12dbddceccb10d289918aa Mon Sep 17 00:00:00 2001 From: Ryan Harrison Date: Wed, 14 Nov 2018 21:04:16 +0000 Subject: [PATCH] Set correct ASAN flags for SPIRV-cross fuzzers These fuzzers currently depend on being able to change the signal handler at runtime, but the default flags being used forbid this. This CL overrides the upstream default to allow changing the handler. BUG=chromium:904725,chromium:904712 Change-Id: I68423564981b7f2e39f7c00744b92da982cf19e9 Reviewed-on: https://dawn-review.googlesource.com/c/2361 Commit-Queue: Corentin Wallez Reviewed-by: Max Moroz Reviewed-by: Corentin Wallez --- src/fuzzers/BUILD.gn | 29 ++++++++++++++++++++++++++--- 1 file changed, 26 insertions(+), 3 deletions(-) diff --git a/src/fuzzers/BUILD.gn b/src/fuzzers/BUILD.gn index 9680d6e3b5..23e8de003f 100644 --- a/src/fuzzers/BUILD.gn +++ b/src/fuzzers/BUILD.gn @@ -42,6 +42,7 @@ if (build_with_chromium) { test(target_name) { forward_variables_from(invoker, [ + "asan_options", "cflags", "cflags_cc", "check_includes", @@ -51,6 +52,10 @@ if (build_with_chromium) { "sources", ]) + if (defined(asan_options)) { + not_needed([ "asan_options" ]) + } + if (!defined(configs)) { configs = [] } @@ -75,6 +80,8 @@ static_library("dawn_spirv_cross_fuzzer_common") { ] } +# TODO(rharrison): Remove asan_options once signal trap is no longer +# needed. # Uses Dawn specific options and varies input data dawn_fuzzer_test("dawn_spirv_cross_glsl_fast_fuzzer") { sources = [ @@ -83,9 +90,12 @@ dawn_fuzzer_test("dawn_spirv_cross_glsl_fast_fuzzer") { deps = [ ":dawn_spirv_cross_fuzzer_common", ] + asan_options = [ "allow_user_segv_handler=1" ] } -# Varies bother the options and input data +# TODO(rharrison): Remove asan_options once signal trap is no longer +# needed. +# Varies both the options and input data dawn_fuzzer_test("dawn_spirv_cross_glsl_full_fuzzer") { sources = [ "DawnSPIRVCrossGLSLFullFuzzer.cpp", @@ -93,8 +103,11 @@ dawn_fuzzer_test("dawn_spirv_cross_glsl_full_fuzzer") { deps = [ ":dawn_spirv_cross_fuzzer_common", ] + asan_options = [ "allow_user_segv_handler=1" ] } +# TODO(rharrison): Remove asan_options once signal trap is no longer +# needed. # Uses Dawn specific options and varies input data dawn_fuzzer_test("dawn_spirv_cross_hlsl_fast_fuzzer") { sources = [ @@ -103,9 +116,12 @@ dawn_fuzzer_test("dawn_spirv_cross_hlsl_fast_fuzzer") { deps = [ ":dawn_spirv_cross_fuzzer_common", ] + asan_options = [ "allow_user_segv_handler=1" ] } -# Varies bother the options and input data +# TODO(rharrison): Remove asan_options once signal trap is no longer +# needed. +# Varies both the options and input data dawn_fuzzer_test("dawn_spirv_cross_hlsl_full_fuzzer") { sources = [ "DawnSPIRVCrossGLSLFullFuzzer.cpp", @@ -113,8 +129,11 @@ dawn_fuzzer_test("dawn_spirv_cross_hlsl_full_fuzzer") { deps = [ ":dawn_spirv_cross_fuzzer_common", ] + asan_options = [ "allow_user_segv_handler=1" ] } +# TODO(rharrison): Remove asan_options once signal trap is no longer +# needed. # Uses Dawn specific options and varies input data dawn_fuzzer_test("dawn_spirv_cross_msl_fast_fuzzer") { sources = [ @@ -123,9 +142,12 @@ dawn_fuzzer_test("dawn_spirv_cross_msl_fast_fuzzer") { deps = [ ":dawn_spirv_cross_fuzzer_common", ] + asan_options = [ "allow_user_segv_handler=1" ] } -# Varies bother the options and input data +# TODO(rharrison): Remove asan_options once signal trap is no longer +# needed. +# Varies both the options and input data dawn_fuzzer_test("dawn_spirv_cross_msl_full_fuzzer") { sources = [ "DawnSPIRVCrossGLSLFullFuzzer.cpp", @@ -133,6 +155,7 @@ dawn_fuzzer_test("dawn_spirv_cross_msl_full_fuzzer") { deps = [ ":dawn_spirv_cross_fuzzer_common", ] + asan_options = [ "allow_user_segv_handler=1" ] } dawn_fuzzer_test("dawn_wire_server_and_frontend_fuzzer") {