From d095040ae9bba871d3025fa106edabb0840193b4 Mon Sep 17 00:00:00 2001 From: Kevin Lubick Date: Tue, 20 Mar 2018 10:10:58 -0400 Subject: Add in float-divide-by-zero as an FYI sanitizer Bug: skia: Change-Id: Iacf9bcf10c69d3d6e2a1a2bdcce62bdd364582a1 Reviewed-on: https://skia-review.googlesource.com/115078 Reviewed-by: Mike Klein --- gn/BUILD.gn | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'gn/BUILD.gn') diff --git a/gn/BUILD.gn b/gn/BUILD.gn index f75637a961..8b4f953763 100644 --- a/gn/BUILD.gn +++ b/gn/BUILD.gn @@ -212,9 +212,17 @@ config("default") { # You can either pass the sanitizers directly, e.g. "address,undefined", # or pass one of the couple common aliases used by the bots. sanitizers = sanitize + + # fyi_sanitizers only print out stacktraces of their issues + fyi_sanitizers = fyi_sanitize if (sanitize == "ASAN" || sanitize == "UBSAN") { # ASAN implicitly runs all UBSAN checks also. sanitizers = "bool,float-cast-overflow,integer-divide-by-zero,nonnull-attribute,null,return,returns-nonnull-attribute,shift,signed-integer-overflow,unreachable,vla-bound" + + if (fyi_sanitize == "" && !is_android) { + fyi_sanitizers = "float-divide-by-zero" + } + if (!is_mac && !is_win) { sanitizers += ",function" # Not supported on Mac or Win. } @@ -245,7 +253,7 @@ config("default") { } cflags += [ - "-fsanitize=$sanitizers", + "-fsanitize=$sanitizers,$fyi_sanitizers", "-fno-sanitize-recover=$sanitizers", ] if (!is_win) { -- cgit v1.2.3