mirror of
https://mirror.skon.top/https://github.com/FFmpeg/FFmpeg
synced 2026-04-20 21:00:41 +08:00
configure: warn about excessive stack usage
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 <kasper93@gmail.com>
This commit is contained in:
4
configure
vendored
4
configure
vendored
@@ -7877,6 +7877,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
|
||||
|
||||
Reference in New Issue
Block a user