shithub: libvpx

Download patch

ref: d2828f773fd034fb6c44f544e6c2db6e22ca4dc9
parent: 3a0d78272f4a10835f9b2881405e1e62f0344335
author: James Zern <jzern@google.com>
date: Thu Mar 14 19:07:23 EDT 2019

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

--- a/tools/set_analyzer_env.sh
+++ b/tools/set_analyzer_env.sh
@@ -30,7 +30,7 @@
   *)
     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 @@
 
 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