[FFmpeg-devel] Valgrind fate failing only with asm

Reimar Döffinger Reimar.Doeffinger at gmx.de
Tue Jan 17 00:05:40 CET 2012


Hello,
didn't manage to figure it out quickly so I thought I'd throw it out
here.
fate-h264-conformance-ba1_ft_c does not pass for me under valgrind.
Error:
==24946== Conditional jump or move depends on uninitialised value(s)
==24946==    at 0xA96786: av_adler32_update (adler32.c:46)
==24946==    by 0x4C62AD: framecrc_write_packet (framecrcenc.c:27)
==24946==    by 0x53FB67: av_interleaved_write_frame (utils.c:3523)
==24946==    by 0x4407DC: write_frame (ffmpeg.c:1003)
==24946==    by 0x440A5A: do_video_out.isra.26 (ffmpeg.c:1546)
==24946==    by 0x4429BD: output_packet (ffmpeg.c:2147)
==24946==    by 0x445917: transcode (ffmpeg.c:3010)
==24946==    by 0x43CE01: main (ffmpeg.c:5094)
==24946==  Uninitialised value was created by a stack allocation
==24946==    at 0xA2CD82: ??? (libavcodec/x86/h264_deblock.asm:845)
==24946== 

However it works fine when I disable the MMX code:
--- a/libavcodec/x86/h264dsp_mmx.c
+++ b/libavcodec/x86/h264dsp_mmx.c
@@ -375,7 +375,7 @@ void ff_h264dsp_init_x86(H264DSPContext *c, const int bit_depth, const int chrom
             c->h264_v_loop_filter_chroma= ff_deblock_v_chroma_8_mmxext;
             c->h264_v_loop_filter_chroma_intra= ff_deblock_v_chroma_intra_8_mmxext;
             if (chroma_format_idc == 1) {
-                c->h264_h_loop_filter_chroma= ff_deblock_h_chroma_8_mmxext;
+//                c->h264_h_loop_filter_chroma= ff_deblock_h_chroma_8_mmxext;
                 c->h264_h_loop_filter_chroma_intra= ff_deblock_h_chroma_intra_8_mmxext;
             }
 #if ARCH_X86_32

Might this be a false positive or something broken about the asm?
It seems very strange to me, since the asm code looks to me
like the stack locations will always be written, thus no uninitialized
data can come from a stack allocation in h264_deblock.asm.


More information about the ffmpeg-devel mailing list