PR #23316 opened by catap
URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/23316
Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/23316.patch

Details of the issue: https://marc.info/?t=178015389900001&r=1&w=2



>From 523b6bf99573d964a3d2b8619df1f288989aca08 Mon Sep 17 00:00:00 2001
From: "Kirill A. Korinsky" <[email protected]>
Date: Mon, 1 Jun 2026 19:52:16 +0200
Subject: [PATCH] Adjust configure EBP test for llvm-22 changes

Details of the issue: https://marc.info/?t=178015389900001&r=1&w=2
---
 configure | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/configure b/configure
index b0923e4789..e40a87bd18 100755
--- a/configure
+++ b/configure
@@ -6824,11 +6824,19 @@ elif enabled x86; then
     # As 'i' is stored on the stack, this program will crash
     # if the base pointer is used to access it because the
     # base pointer is cleared in the inline assembly code.
-    check_exec_crash <<EOF && enable ebp_available
+    # Since 
https://github.com/llvm/llvm-project/commit/0d471b3f64d3116bd57c79d872f7384fff80daa5,
+    # Clang can save/restore EBP around clobber-only asm, so the old
+    # crash probe can be a false positive.
+    check_exec_crash <<EOF && test_cc <<EOF_EBP_REGS && enable ebp_available
 volatile int i=0;
 __asm__ volatile ("xorl %%ebp, %%ebp" ::: "%ebp");
 return i;
 EOF
+void foo(void *a, void *b, void *c, void *d, int e, void *f)
+{
+    __asm__ volatile ("" :: "r"(a), "r"(b), "r"(c), "r"(d), "g"(e), "r"(f) : 
"%eax", "%edx");
+}
+EOF_EBP_REGS
 
     # check whether EBX is available on x86
     check_inline_asm ebx_available '""::"b"(0)' &&
-- 
2.52.0

_______________________________________________
ffmpeg-devel mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to