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

Git pushed a commit to branch master
in repository ffmpeg.

The following commit(s) were added to refs/heads/master by this push:
     new f1d4dd2bd0 avcodec/x86/cabac: fix build with AddressSanitizer
f1d4dd2bd0 is described below

commit f1d4dd2bd0ace9263b590b1f3a500190b8687bef
Author:     Zhao Zhili <[email protected]>
AuthorDate: Tue Nov 17 15:58:28 2026 +0800
Commit:     Zhao Zhili <[email protected]>
CommitDate: Tue Nov 17 16:21:49 2026 +0000

    avcodec/x86/cabac: fix build with AddressSanitizer
    
    Sanitizer builds are compiled with -fno-omit-frame-pointer. Together
    with AddressSanitizer's instrumentation of the locals, this leaves too
    few general-purpose registers on x86-64 for the operand constraints of
    decode_significance_x86 and decode_significance_8x8_x86 in unoptimized
    builds, and the compiler rejects the inline assembly.
    
    Inline assembly is not instrumented, so it brings no sanitizer coverage.
    Use the C implementation of the significance decoders in sanitizer
    builds instead.
    
    Regression since cd8d538fe7
---
 libavcodec/x86/h264_cabac.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libavcodec/x86/h264_cabac.c b/libavcodec/x86/h264_cabac.c
index 734879dbd6..bf7928ab29 100644
--- a/libavcodec/x86/h264_cabac.c
+++ b/libavcodec/x86/h264_cabac.c
@@ -29,6 +29,7 @@
 #include <stddef.h>
 
 #include "libavcodec/cabac.h"
+#include "libavutil/sanitizer.h"
 #include "cabac.h"
 
 #if HAVE_INLINE_ASM
@@ -41,7 +42,7 @@
 
 //FIXME use some macros to avoid duplicating get_cabac (cannot be done yet
 //as that would make optimization work hard)
-#if HAVE_X86_7REGS && !BROKEN_COMPILER
+#if HAVE_X86_7REGS && !BROKEN_COMPILER && !HAVE_ASAN
 #define decode_significance decode_significance_x86
 static int decode_significance_x86(CABACContext *c, int max_coeff,
                                    uint8_t *significant_coeff_ctx_base,

-- 
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