[Scummvm-git-logs] scummvm master -> c400455e25e4139f6dc64b36973d49d8c21acdcb

bluegr noreply at scummvm.org
Mon Jan 3 22:56:37 UTC 2022


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
c400455e25 CONFIGURE: added --enable-ubsan to enable the undefined behavior sanitizer


Commit: c400455e25e4139f6dc64b36973d49d8c21acdcb
    https://github.com/scummvm/scummvm/commit/c400455e25e4139f6dc64b36973d49d8c21acdcb
Author: neuromancer (gustavo.grieco at gmail.com)
Date: 2022-01-04T00:56:33+02:00

Commit Message:
CONFIGURE: added --enable-ubsan to enable the undefined behavior sanitizer

Changed paths:
    configure


diff --git a/configure b/configure
index f4390f4d3aa..547e1cbe66e 100755
--- a/configure
+++ b/configure
@@ -190,6 +190,7 @@ _build_aspect=yes
 _enable_prof=no
 _enable_asan=no
 _enable_tsan=no
+_enable_ubsan=no
 _global_constructors=no
 _no_undefined_var_template=no
 _no_pragma_pack=no
@@ -868,6 +869,7 @@ Optional Features:
   --enable-optimizations   enable optimizations
   --enable-asan            enable Address Sanitizer for memory-related debugging
   --enable-tsan            enable Thread Sanitizer for thread-related debugging
+  --enable-ubsan           enable Undefined Behavior Sanitizer for undefined-behavior-related debugging
   --enable-profiling       enable profiling
   --enable-plugins         enable the support for dynamic plugins
   --default-dynamic        make plugins dynamic by default
@@ -1364,6 +1366,9 @@ for ac_option in $@; do
 	--enable-tsan)
 		_enable_tsan=yes
 		;;
+	--enable-ubsan)
+		_enable_ubsan=yes
+		;;
 	--no-builtin-resources)
 		_builtin_resources=no
 		;;
@@ -5954,6 +5959,14 @@ if test "$_enable_tsan" = yes ; then
 fi
 echo "$_enable_tsan"
 
+echo_n "Enabling Undefined Behavior Sanitizer... "
+
+if test "$_enable_ubsan" = yes ; then
+	append_var CXXFLAGS "-fsanitize=undefined"
+	append_var LDFLAGS "-fsanitize=undefined"
+fi
+echo "$_enable_ubsan"
+
 echo_n "Backend... "
 echo_n "$_backend"
 




More information about the Scummvm-git-logs mailing list