From: James Zern Date: Fri, 15 Mar 2019 06:07:23 +0000 (-0700) Subject: set_analyzer_env.sh: improve cfi diagnostics X-Git-Tag: v1.8.1~189 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d2828f773fd034fb6c44f544e6c2db6e22ca4dc9;p=libvpx set_analyzer_env.sh: improve cfi diagnostics use -fno-sanitize-trap=cfi to allow a diagnostic to be printed rather than aborting with a SIGILL. https://clang.llvm.org/docs/ControlFlowIntegrity.html#trapping-and-diagnostics Change-Id: I4517cafe3c7b7305ba4845dbadf9fb679c686843 --- diff --git a/tools/set_analyzer_env.sh b/tools/set_analyzer_env.sh index 814a0e7fd..8ee0c4fe5 100644 --- a/tools/set_analyzer_env.sh +++ b/tools/set_analyzer_env.sh @@ -30,7 +30,7 @@ case "${sanitizer}" in *) echo "Usage: source set_analyzer_env.sh [|clear]" echo " Supported sanitizers:" - echo " address integer memory thread undefined" + echo " address cfi integer memory thread undefined" return 1 ;; esac @@ -77,8 +77,8 @@ cflags="${cflags} -fno-optimize-sibling-calls" if [ "${sanitizer}" = "cfi" ]; then # https://clang.llvm.org/docs/ControlFlowIntegrity.html - cflags="${cflags} -flto -fvisibility=hidden" - ldflags="${ldflags} -flto -fuse-ld=gold" + cflags="${cflags} -fno-sanitize-trap=cfi -flto -fvisibility=hidden" + ldflags="${ldflags} -fno-sanitize-trap=cfi -flto -fuse-ld=gold" export AR="llvm-ar" fi