Skip to content

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

Basic info

Bug description

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

==33860==WARNING: MemorySanitizer: use-of-uninitialized-value
    #0 0x4df636 in L_shl_o /ivas-basop/lib_basop/basop32.c:2281:18
    #1 0x4e00ad in L_shl_sat /ivas-basop/lib_basop/basop32.c:2362:12
    #2 0x1e3909e in Copy_Scale_sig_32_16 /ivas-basop/lib_com/tools_fx.c:1450:34
    #3 0x120cb52 in acelp_core_dec_fx /ivas-basop/lib_dec/acelp_core_dec_fx.c:2339:13
    #4 0x13d7d32 in ivas_core_dec_fx /ivas-basop/lib_dec/ivas_core_dec_fx.c:527:13
    #5 0xbb0d35 in ivas_sce_dec_fx /ivas-basop/lib_dec/ivas_sce_dec_fx.c:298:5
    #6 0x93d462 in ivas_jbm_dec_tc_fx /ivas-basop/lib_dec/ivas_jbm_dec_fx.c:306:13
    #7 0x516bd2 in IVAS_DEC_GetSamplesDecoder /ivas-basop/lib_dec/lib_dec_fx.c:3948:13
    #8 0x4c0f79 in decodeG192 /ivas-basop/apps/decoder.c:2322:32
    #9 0x4a4fef in main /ivas-basop/apps/decoder.c:702:17
    #10 0x7f046f45bd8f in __libc_start_call_main csu/../sysdeps/nptl/libc_start_call_main.h:58:16
    #11 0x7f046f45be3f in __libc_start_main csu/../csu/libc-start.c:392:3
    #12 0x420394 in _start (/ivas-basop/CLANG1/IVAS_dec+0x420394)

SUMMARY: MemorySanitizer: use-of-uninitialized-value /ivas-basop/lib_basop/basop32.c:2281:18 in L_shl_o

Ways to reproduce

ltv48_FOA_FOA_b24_4_dtx_swb_cbr_sidstart_5frames.192

IVAS_dec MONO 32 ltv48_FOA_FOA_b24_4_dtx_swb_cbr_sidstart_5frames.192 out.wav