[Scummvm-git-logs] scummvm master -> 8a73f5d496437f8211c67c1da4c6cc4b200c4970

bluegr noreply at scummvm.org
Fri Aug 19 21:00:03 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:
8a73f5d496 CONFIGURE: Enable SCUMM_NEED_ALIGNMENT when using --enable-ubsan


Commit: 8a73f5d496437f8211c67c1da4c6cc4b200c4970
    https://github.com/scummvm/scummvm/commit/8a73f5d496437f8211c67c1da4c6cc4b200c4970
Author: Donovan Watteau (contrib at dwatteau.fr)
Date: 2022-08-19T23:59:57+03:00

Commit Message:
CONFIGURE: Enable SCUMM_NEED_ALIGNMENT when using --enable-ubsan

-fsanitize=undefined implies -fsanitize=alignment, so we need to define
SCUMM_NEED_ALIGNMENT for UBSan builds, otherwise many false positives
will be reported, such as for engines/scumm/smush/codec47.cpp.

That's also a good way of having more tests for the SCUMM_NEED_ALIGNMENT
code paths during development :)

Changed paths:
    configure


diff --git a/configure b/configure
index a441cc5345e..6dae89fba92 100755
--- a/configure
+++ b/configure
@@ -2490,6 +2490,10 @@ case $_host_cpu in
 		_need_memalign=yes
 		;;
 esac
+if test "$_enable_ubsan" = yes ; then
+	# UBSan implies -fsanitize=alignment, so avoid false positives.
+	_need_memalign=yes
+fi
 echo "$_need_memalign"
 
 define_in_config_h_if_yes $_need_memalign 'SCUMM_NEED_ALIGNMENT'




More information about the Scummvm-git-logs mailing list