This is an automated email from the git hooks/post-receive script.

Git pushed a commit to branch master
in repository ffmpeg.

commit d4fec1563f7dc41ef6ecef6eea6dbca658744ac5
Author:     Jun Zhao <[email protected]>
AuthorDate: Fri Nov 13 14:07:07 2026 +0800
Commit:     Jun Zhao <[email protected]>
CommitDate: Fri Nov 13 22:02:43 2026 +0000

    configure: also warn about large stack frames with clang
    
    -Wstack-usage is GCC-only; Clang rejects it, so check_warning() silently
    skips it and Clang builds get no guard against stack frames exceeding
    the 120 KiB threshold (chosen for musl's 128 KiB default thread stacks).
    
    Fall back to -Wframe-larger-than=122880 when -Wstack-usage=122880 is not
    supported.  With check_warning() now reporting the C probe result, GCC
    stays on -Wstack-usage=122880 without enabling both options and warning
    twice, while Clang picks up -Wframe-larger-than=122880.
    
    Unlike -Wstack-usage=, -Wframe-larger-than= only accounts for static
    frame allocations (excluding VLAs / alloca).  Note that clang-cl accepts
    the flag in the driver without forwarding -fwarn-stack-size= to -cc1, so
    clang-cl and MSVC remain uncovered as before.
    
    Suggested-by: Kacper Michajłow <[email protected]>
    Signed-off-by: Jun Zhao <[email protected]>
---
 configure | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/configure b/configure
index 65fc2c3a39..48a506bc2f 100755
--- a/configure
+++ b/configure
@@ -7858,7 +7858,9 @@ check_warning -Wempty-body
 # Warn about excessive stack usage, using a 120 KiB per-function threshold.
 # This roughly matches the default thread stack size on Musl, which is 128 KiB,
 # leaving some headroom for caller frames.
-check_warning -Wstack-usage=122880
+if ! check_warning -Wstack-usage=122880; then
+    check_warning -Wframe-larger-than=122880
+fi
 
 # GCC accepts warning option level 5 here to warn about all fallthroughs
 # that are not explicitly marked with the appropriate attribute

-- 
To stop receiving notification emails like this one, please contact
[email protected].
_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to