summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Zern <jzern@google.com>2019-03-14 23:07:23 -0700
committerJames Zern <jzern@google.com>2019-03-14 23:07:23 -0700
commitd2828f773fd034fb6c44f544e6c2db6e22ca4dc9 (patch)
treece89e7e67a7660d8cb05961f8f6bea8f45499734
parent3a0d78272f4a10835f9b2881405e1e62f0344335 (diff)
downloadlibvpx-d2828f773fd034fb6c44f544e6c2db6e22ca4dc9.tar
libvpx-d2828f773fd034fb6c44f544e6c2db6e22ca4dc9.tar.gz
libvpx-d2828f773fd034fb6c44f544e6c2db6e22ca4dc9.tar.bz2
libvpx-d2828f773fd034fb6c44f544e6c2db6e22ca4dc9.zip
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
-rw-r--r--tools/set_analyzer_env.sh6
1 files changed, 3 insertions, 3 deletions
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 [<sanitizer>|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