From 835781af23d9c45f25bee9d8faaa864d0dad6ee2 Mon Sep 17 00:00:00 2001 From: Andreas Rheinhardt Date: Mon, 9 Mar 2026 15:35:07 +0100 Subject: [PATCH] configure,swscale/x86/Makefile: Remove special red-zone handling ff_h[yc]scale_fast_mmxext() call other functions from inline assembly; these functions look like leaf functions to GCC, so it may use the red zone to avoid modifying the stack. But this makes the call instructions in the inline asm corrupt the stack. In order to fix this 424bcc46b5fb0d662e0fb9ad6319c5b9ef3d770f made libswscale/x86/swscale_mmx.o be compiled with -mno-red-zone. Later Libav fixed it in their version in commit b14fa5572c2a3bb1d8cd6327c4687a2eee363bbb by saving and restoring the memory clobbered by the call (as is still done now). This was merged into FFmpeg in 0e7fc3cafe838b32c3af73954acf9de2f9240ffd, without touching the -mno-red-zone hack. Libav later renamed swscale_mmx.c to just swscale.c in 16d2a1a51c1dbdd69ee47b19c8ab66b905b7c5ce which was merged into FFmpeg in commit 2cb4d516549526b5e17e941f6d2375a2c501ade6, without removing the -mno-red-zone hack, although the file it applies to no longer existed. This commit removes the special red-zone handling given that it is inactive anyway. Signed-off-by: Andreas Rheinhardt --- configure | 6 ------ libswscale/x86/Makefile | 2 -- 2 files changed, 8 deletions(-) diff --git a/configure b/configure index 08b86b621b..2f6167fddb 100755 --- a/configure +++ b/configure @@ -8014,11 +8014,6 @@ fi enabled ftrapv && check_cflags -ftrapv -test_cc -mno-red-zone <