https://github.com/python/cpython/commit/90dc8bdc09b7b20c4206fec7f119d5bac5d48c52
commit: 90dc8bdc09b7b20c4206fec7f119d5bac5d48c52
branch: main
author: Stan Ulbrych <[email protected]>
committer: StanFromIreland <[email protected]>
date: 2026-10-31T17:13:26Z
summary:

Disable UBSan alignment check in `configure`'s aligned-access test (#161012)

files:
M configure
M configure.ac

diff --git a/configure b/configure
index a11cd0c27bcf0d..1b81c6022bfbfd 100755
--- a/configure
+++ b/configure
@@ -16191,6 +16191,11 @@ else case e in #(
   e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
+#ifdef __has_attribute
+#  if __has_attribute(no_sanitize)
+__attribute__((no_sanitize("alignment")))
+#  endif
+#endif
 int main(void)
 {
     char s[16];
diff --git a/configure.ac b/configure.ac
index 640919bd07bd8d..fa076d486c2960 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4466,6 +4466,11 @@ esac
 # check for systems that require aligned memory access
 AC_CACHE_CHECK([aligned memory access is required], [ac_cv_aligned_required],
 [AC_RUN_IFELSE([AC_LANG_SOURCE([[
+#ifdef __has_attribute
+#  if __has_attribute(no_sanitize)
+__attribute__((no_sanitize("alignment")))
+#  endif
+#endif
 int main(void)
 {
     char s[16];

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: [email protected]

Reply via email to