Opened 4 years ago

Closed 4 years ago

#1080 closed defect (fixed)

MemorySanitizer: use-of-uninitialized-value in DecApp.cpp

Reported by: pierrick.bouvier Owned by:
Priority: minor Milestone:
Component: VTM Version:
Keywords: Cc: ksuehring, XiangLi, fbossen, jvet@…

Description

When reading an InputNAL, only its type is initialized to NAL_UNIT_INVALID.
Alas, its layer id is not initialized (should be 0).

This can cause difference in decoding process.

Reported by Memory Sanitizer:
==11300==WARNING: MemorySanitizer: use-of-uninitialized-value

*0 0x4b4a7b in DecLib::getFirstSliceInSequence(int) const /tmp/update-vtm-131/vtm.msan/build/../source/Lib/CommonLib/../DecoderLib/DecLib.h:196:61
*1 0x4b4a7b in DecApp::decode() /tmp/update-vtm-131/vtm.msan/build/../source/App/DecoderApp/DecApp.cpp:199:93
*2 0x4e583c in main /tmp/update-vtm-131/vtm.msan/build/../source/App/DecoderApp/decmain.cpp:91:24
*3 0x7fc00676a09a in libc_start_main /build/glibc-vjB4T1/glibc-2.28/csu/../csu/libc-start.c:308:16
*4 0x435529 in _start (/data/code/allegro/build/x64_release_lto/vtmdec_msan.exe+0x435529)

Uninitialized value was created by an allocation of 'nalu' in the stack frame of function '_ZN6DecApp6decodeEv'

#0 0x4b0ad0 in DecApp::decode() /tmp/update-vtm-131/vtm.msan/build/../source/App/DecoderApp/DecApp.cpp:77

SUMMARY: MemorySanitizer: use-of-uninitialized-value /tmp/update-vtm-131/vtm.msan/build/../source/Lib/CommonLib/../DecoderLib/DecLib.h:196:61 in DecLib::getFirstSliceInSequence(int) const

Fix is simply to call NAL ctor with NAL_UNIT_INVALID in InputNAL ctor.

Change history (2)

comment:2 Changed 4 years ago by fbossen

  • Resolution set to fixed
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.