[gjs: 5/10] build: Use new integer sanitizer along with UBsan
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc: 
- Subject: [gjs: 5/10] build: Use new integer sanitizer along with UBsan
- Date: Sun,  2 Dec 2018 02:09:23 +0000 (UTC)
commit c456680fa1ed6cdd7488cb71e0707090893cb679
Author: Philip Chimento <philip chimento gmail com>
Date:   Sat Nov 10 12:49:51 2018 -0500
    build: Use new integer sanitizer along with UBsan
    
    See https://blog.regehr.org/archives/905 for more information about the
    tool.
 configure.ac | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 8b01cbbc..db7a3693 100644
--- a/configure.ac
+++ b/configure.ac
@@ -265,7 +265,7 @@ AS_IF([test "x$enable_Bsymbolic" != "xno"],
   [AX_APPEND_LINK_FLAGS([-Bsymbolic-functions])])
 
 dnl
-dnl Check for -fsanitize=address and -fsanitize=undefined support
+dnl Check for sanitizer support
 dnl
 AC_ARG_ENABLE([asan],
   [AS_HELP_STRING([--enable-asan], [Build with address sanitizer support @<:@default: no@:>@])])
@@ -278,12 +278,12 @@ AS_IF([test "x$enable_asan" = "xyes"], [
 ])
 
 AC_ARG_ENABLE([ubsan],
-  [AS_HELP_STRING([--enable-ubsan], [Build with undefined behavior sanitizer support @<:@default: no@:>@])])
+  [AS_HELP_STRING([--enable-ubsan], [Build with undefined behavior and integer overflow sanitizer support 
@<:@default: no@:>@])])
 
 AS_IF([test "x$enable_ubsan" = "xyes"], [
-  AX_CHECK_COMPILE_FLAG([-fsanitize=undefined -fno-sanitize=vptr -fno-omit-frame-pointer -g], [
-    AX_CHECK_LINK_FLAG([-fsanitize=undefined -fno-sanitize=vptr])
-    SAN_FLAGS="$SAN_FLAGS -fsanitize=undefined -fno-sanitize=vptr"
+  AX_CHECK_COMPILE_FLAG([-fsanitize=undefined -fsanitize=integer -fno-sanitize=vptr -fno-omit-frame-pointer 
-g], [
+    AX_CHECK_LINK_FLAG([-fsanitize=undefined -fsanitize=integer -fno-sanitize=vptr])
+    SAN_FLAGS="$SAN_FLAGS -fsanitize=undefined -fsanitize=integer -fno-sanitize=vptr"
   ])
 ])
 
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]