Skip to content

MSAN: use-of-uninit-value in MASA decoding with bitstream that starts with an SID

Basic info

Bug description

Decoding a bitstream that starts with an SID (this one MASA), results in an MSAN error:

==48623==WARNING: MemorySanitizer: use-of-uninitialized-value
    #0 0x4d850b in saturate /ivas-basop/lib_basop/basop32.c:481:10
    #1 0x4d88db in sub /ivas-basop/lib_basop/basop32.c:622:15
    #2 0x780dab in search_del_fx /ivas-basop/lib_dec/dec_post_fx.c:750:14
    #3 0x77e5b3 in pst_ltp_fx /ivas-basop/lib_dec/dec_post_fx.c:588:5
    #4 0x778f2a in Dec_postfilt_fx /ivas-basop/lib_dec/dec_post_fx.c:220:9
    #5 0x778080 in nb_post_filt_fx /ivas-basop/lib_dec/dec_post_fx.c:145:9
    #6 0x11f3510 in acelp_core_dec_fx /ivas-basop/lib_dec/acelp_core_dec_fx.c:1475:13
    #7 0x13d7d32 in ivas_core_dec_fx /ivas-basop/lib_dec/ivas_core_dec_fx.c:527:13
    #8 0xbb0d35 in ivas_sce_dec_fx /ivas-basop/lib_dec/ivas_sce_dec_fx.c:298:5
    #9 0x93d462 in ivas_jbm_dec_tc_fx /ivas-basop/lib_dec/ivas_jbm_dec_fx.c:306:13
    #10 0x516bd2 in IVAS_DEC_GetSamplesDecoder /ivas-basop/lib_dec/lib_dec_fx.c:3948:13
    #11 0x4c0f79 in decodeG192 /ivas-basop/apps/decoder.c:2322:32
    #12 0x4a4fef in main /ivas-basop/apps/decoder.c:702:17
    #13 0x7f47ad11cd8f in __libc_start_call_main csu/../sysdeps/nptl/libc_start_call_main.h:58:16
    #14 0x7f47ad11ce3f in __libc_start_main csu/../csu/libc-start.c:392:3
    #15 0x420394 in _start (/ivas-basop/IVAS_dec+0x420394)

SUMMARY: MemorySanitizer: use-of-uninitialized-value /ivas-basop/lib_basop/basop32.c:481:10 in saturate

This also happens in EVS decoder for some StereoDmxEVS testcases.

Ways to reproduce

bitstream: ltv48_MASA1TC_MASA_1TC_b512_dtx_wb_cbr_sidstart_5frames.192

make clean
make CLANG=1
IVAS_dec MONO 16 /ivas-basop/CLANG1/enc/ltv48_MASA1TC_MASA_1TC_b512_dtx_wb_cbr_sidstart_5frames.192 out.wav

OR:

ltv48_STEREO_StereoDmxEvs_b48_dtx_wb_cbr_sidstart_5frames.192


make clean
make CLANG=1
IVAS_dec 16 ltv48_STEREO_StereoDmxEvs_b48_dtx_wb_cbr_sidstart_5frames.192 out.wav
Edited by Jan Kiene