https://github.com/python/cpython/commit/2b2d15d105f640e9217123760d4ea50c97898691
commit: 2b2d15d105f640e9217123760d4ea50c97898691
branch: 3.14
author: Miss Islington (bot) <[email protected]>
committer: StanFromIreland <[email protected]>
date: 2026-10-31T17:41:46Z
summary:

[3.14] Disable UBSan alignment check in `configure`'s aligned-access test 
(GH-161012) (#161020)

(cherry picked from commit 90dc8bdc09b7b20c4206fec7f119d5bac5d48c52)

Co-authored-by: Stan Ulbrych <[email protected]>

files:
M configure
M configure.ac

diff --git a/configure b/configure
index 2a4b6fc96cc863..1a00f44916b51a 100755
--- a/configure
+++ b/configure
@@ -15064,6 +15064,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 f51935d8813ca6..f7661778b75742 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4015,6 +4015,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