From 83542cbc0d3318977ec79f70869050551929bc05 Mon Sep 17 00:00:00 2001 From: Zanie Blue Date: Wed, 22 Jul 2026 10:33:05 -0500 Subject: [PATCH] Skip BOLT optimization for HACL hash compressors --- cpython-unix/build-cpython.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cpython-unix/build-cpython.sh b/cpython-unix/build-cpython.sh index d83ab8eb8..bd42dfad2 100755 --- a/cpython-unix/build-cpython.sh +++ b/cpython-unix/build-cpython.sh @@ -495,7 +495,11 @@ if [ -n "${CPYTHON_OPTIMIZED}" ]; then # https://github.com/python/cpython/issues/128514 # https://github.com/python/cpython/pull/134642 # https://github.com/llvm/llvm-project/issues/174191 - BOLT_COMMON_FLAGS="-update-debug-sections -skip-funcs=RC4_options/1" + # BOLT's allocation combiner can remove required stack allocations in + # the HACL hash compressors, leaving frame-pointer-relative accesses + # below the x86-64 red zone. Match BOLT's `/N` suffix for local symbols. + # https://github.com/astral-sh/uv/issues/20618 + BOLT_COMMON_FLAGS="-update-debug-sections -skip-funcs=RC4_options/1,sha256_update/.*,sha512_update/.*,PyBlake2_blake2b_compress/.*,PyBlake2_blake2s_compress/.*,update_block.*" BOLT_APPLY_FLAGS="${BOLT_COMMON_FLAGS} \ -reorder-blocks=ext-tsp \ -reorder-functions=cdsort \