]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-148832: Use `-icf=0` in BOLT_APPLY_FLAGS (gh-148833)
authorShamil <ashm.tech@proton.me>
Sat, 6 Jun 2026 07:19:49 +0000 (10:19 +0300)
committerGitHub <noreply@github.com>
Sat, 6 Jun 2026 07:19:49 +0000 (07:19 +0000)
Misc/NEWS.d/next/Build/2026-04-21-17-27-52.gh-issue-148832.Kx9aQ1.rst [new file with mode: 0644]
configure
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 (file)
index 0000000..867cfcc
--- /dev/null
@@ -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.
index eb53b200bf78bc501b112a9e66560d278e0049f4..67e5b3e468280249647dd532298045f6f22c62fa 100755 (executable)
--- 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
index b2f3f721005069390beca64e4d64fea23e8bf7fe..cdff5ec78a5fb7523f3d48f376ec0cc134fcf350 100644 (file)
@@ -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