https://github.com/python/cpython/commit/2452449b32a768cc088a110fd95390acb5e27f83
commit: 2452449b32a768cc088a110fd95390acb5e27f83
branch: main
author: Shamil <[email protected]>
committer: corona10 <[email protected]>
date: 2026-06-06T07:19:49Z
summary:

gh-148832: Use `-icf=0` in BOLT_APPLY_FLAGS (gh-148833)

files:
A Misc/NEWS.d/next/Build/2026-04-21-17-27-52.gh-issue-148832.Kx9aQ1.rst
M configure
M configure.ac

diff --git 
a/Misc/NEWS.d/next/Build/2026-04-21-17-27-52.gh-issue-148832.Kx9aQ1.rst 
b/Misc/NEWS.d/next/Build/2026-04-21-17-27-52.gh-issue-148832.Kx9aQ1.rst
new file mode 100644
index 000000000000000..867cfcc5ab62ca2
--- /dev/null
+++ b/Misc/NEWS.d/next/Build/2026-04-21-17-27-52.gh-issue-148832.Kx9aQ1.rst
@@ -0,0 +1,4 @@
+Fix :option:`--enable-bolt` build by switching the default BOLT flag from
+``-icf=1`` to ``-icf=0``. ``-icf=1`` folds address-taken functions and
+breaks type-slot dispatch, crashing on :mod:`list` and :mod:`tuple`
+concatenation. Patched by Shamil Abdulaev.
diff --git a/configure b/configure
index eb53b200bf78bc5..67e5b3e46828024 100755
--- a/configure
+++ b/configure
@@ -9593,7 +9593,7 @@ printf "%s\n" "$BOLT_INSTRUMENT_FLAGS" >&6; }
 printf %s "checking BOLT_APPLY_FLAGS... " >&6; }
 if test -z "${BOLT_APPLY_FLAGS}"
 then
-  BOLT_APPLY_FLAGS=" ${BOLT_COMMON_FLAGS} -reorder-blocks=ext-tsp 
-reorder-functions=cdsort -split-functions -icf=1 -inline-all -split-eh 
-reorder-functions-use-hot-size -peepholes=none -jump-tables=aggressive 
-inline-ap -indirect-call-promotion=all -dyno-stats -use-gnu-stack 
-frame-opt=hot "
+  BOLT_APPLY_FLAGS=" ${BOLT_COMMON_FLAGS} -reorder-blocks=ext-tsp 
-reorder-functions=cdsort -split-functions -icf=0 -inline-all -split-eh 
-reorder-functions-use-hot-size -peepholes=none -jump-tables=aggressive 
-inline-ap -indirect-call-promotion=all -dyno-stats -use-gnu-stack 
-frame-opt=hot "
 
 fi
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $BOLT_APPLY_FLAGS" >&5
diff --git a/configure.ac b/configure.ac
index b2f3f7210050693..cdff5ec78a5fb75 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2255,7 +2255,7 @@ then
      -reorder-blocks=ext-tsp
      -reorder-functions=cdsort
      -split-functions
-     -icf=1
+     -icf=0
      -inline-all
      -split-eh
      -reorder-functions-use-hot-size

_______________________________________________
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