PR #22326 opened by Kacper Michajłow (kasper93) URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/22326 Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/22326.patch
Use 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. This warning draws attention to functions in the codebase that may have excessively large stack frames. A few functions could benefit from reducing their frame size. 120 KiB is a reasonable limit. If a function requires more stack, it likely would benefit from restructuring the code. From 711514eddbc632e726a76aefca40260b1c3257f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kacper=20Michaj=C5=82ow?= <[email protected]> Date: Sat, 28 Feb 2026 03:45:20 +0100 Subject: [PATCH] configure: warn about excessive stack usage MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Use 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. This warning draws attention to functions in the codebase that may have excessively large stack frames. A few functions could benefit from reducing their frame size. 120 KiB is a reasonable limit. If a function requires more stack, it likely would benefit from restructuring the code. Signed-off-by: Kacper Michajłow <[email protected]> --- configure | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/configure b/configure index 87a9c02686..cd6901e1b4 100755 --- a/configure +++ b/configure @@ -7859,6 +7859,10 @@ check_warning -Wwrite-strings check_warning -Wtype-limits check_warning -Wundef 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 check_c_warning -Wmissing-prototypes check_c_warning -Wstrict-prototypes check_c_warning -Wunterminated-string-initialization -- 2.52.0 _______________________________________________ ffmpeg-devel mailing list -- [email protected] To unsubscribe send an email to [email protected]
