[libav-bugs] [Bug 1087] New: Valgrind reports uninitialized member of structure in h264_mb.c

bugzilla at libav.org bugzilla at libav.org
Tue Oct 3 17:56:49 CEST 2017


            Bug ID: 1087
           Summary: Valgrind reports uninitialized member of structure in
           Product: Libav
           Version: 12
          Hardware: X86
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: ---
         Component: libavcodec
          Assignee: bugzilla at libav.org
          Reporter: jwatte at gmail.com

I am building a program that decodes H264 captured video, and then runs
computer vision analysis on it.

When I ran my program through valgrind, it complained that I was depending on
uninitialized data.

Turning on thorough source tracking, it turns out that the uninitialized data
was created inside libavcodec:

==11510== Conditional jump or move depends on uninitialised value(s)
==11510==    at 0x76AF5B8: sqrt (w_sqrt.c:27)
==11510==    by 0x18FA43: compute_labels_cv(int, void const*, unsigned char
const*, float*) (main.cpp:574)
==11510==    by 0x190B4D: database_frame(int, int, int, void const*, int, void
const*, int, void const*, int, float, float) (main.cpp:786)
==11510==    by 0x192629: generate_dataset(char const*) (main.cpp:1074)
==11510==    by 0x193D7E: main (main.cpp:1421)
==11510==  Uninitialised value was created by a stack allocation
==11510==    at 0x5C6920: ff_h264_hl_decode_mb (h264_mb.c:798)

This is using version 12.1 of libav.

The line is:
    int is_complex    = CONFIG_SMALL || sl->is_complex ||                      
 IS_INTRA_PCM(mb_type) || sl->qscale == 0;

Presumably, sl->is_complex or sl->qscale aren't initialized at this point?

You are receiving this mail because:
You are watching all bug changes.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.libav.org/pipermail/libav-bugs/attachments/20171003/b46e767a/attachment.html>

More information about the libav-bugs mailing list