From a6cd6ff2d98d907f109322126ebb711a4bcd5222 Mon Sep 17 00:00:00 2001 From: cancel Date: Tue, 21 Jan 2020 20:02:52 +0900 Subject: [PATCH] Add some more sanitize options to build script --- tool | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tool b/tool index 92b1bb1..04bbd4c 100755 --- a/tool +++ b/tool @@ -265,7 +265,12 @@ build_target() { # cygwin gcc doesn't seem to have this stuff, just elide for now if [[ $os != cygwin ]]; then if cc_id_and_vers_gte gcc 6.0.0 || cc_id_and_vers_gte clang 3.9.0; then - add cc_flags -fsanitize=address -fsanitize=undefined + add cc_flags -fsanitize=address -fsanitize=undefined \ + -fsanitize=float-divide-by-zero + fi + if cc_id_and_vers_gte clang 7.0.0; then + add cc_flags -fsanitize=implicit-conversion \ + -fsanitize=unsigned-integer-overflow fi fi if [[ $os = mac ]]; then