[Bug 663180] New: h264parse tests are not valgrind clean

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Tue Nov 1 10:01:10 PDT 2011


https://bugzilla.gnome.org/show_bug.cgi?id=663180
  GStreamer | gst-plugins-bad | git

           Summary: h264parse tests are not valgrind clean
    Classification: Platform
           Product: GStreamer
           Version: git
        OS/Version: Linux
            Status: UNCONFIRMED
          Severity: critical
          Priority: Normal
         Component: gst-plugins-bad
        AssignedTo: gstreamer-bugs at lists.freedesktop.org
        ReportedBy: mail at renestadler.de
         QAContact: gstreamer-bugs at lists.freedesktop.org
     GNOME version: ---


make -C tests/check elements/h264parse.valgrind shows a remaining access
violation that I don't know how to resolve properly:

==23292== Conditional jump or move depends on uninitialised value(s)
==23292==    at 0x6220305: gst_h264_parse_collect_nal (gsth264parse.c:570)
==23292==    by 0x6220A08: gst_h264_parse_check_valid_frame
(gsth264parse.c:689)
==23292==    by 0x665E50D: gst_base_parse_chain (gstbaseparse.c:2381)
==23292==    by 0x62233D7: gst_h264_parse_chain (gsth264parse.c:1413)
[...]

The affected line is:

  complete |= h264parse->picture_start &&
      (nal_type == GST_H264_NAL_SLICE ||
      nal_type == GST_H264_NAL_SLICE_DPA ||
      nal_type == GST_H264_NAL_SLICE_IDR) &&
      /* first_mb_in_slice == 0 considered start of frame */
      (nnalu.data[nnalu.offset + 1] & 0x80);

The violation is in the access to nnalu.data at the specified index. The reason
seems to be that gst_h264_parser_identify_nalu() actually returned
GST_H264_PARSE_NO_NAL_END (which is not handled...). It's not really clear to
me whether the aggregation logic in check_valid_frame is supposed to keep this
from happening or collect_nal needs to be more careful. Changing it return
FALSE in this case (like for PARSER_ERROR) causes the test to fail, so not sure
if this is actually correct and the test is wrong.

Leaving this for the experts to figure out, since I'm not an expert with H264
and the code is too complex for me to infer things...

-- 
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list