Skip to content

Use-of-uninitialized value in Stereo BR switching

Basic info

  • Commit SHA: latest main
  • Platform: all

Bug description

Memory Sanitizer error found in this job:

==================================================================================================
 IVAS Codec Baseline

 Based on EVS Codec (Floating Point) 3GPP TS26.443 Nov 04, 2021,
 Version 12.14.0 / 13.10.0 / 14.6.0 / 15.4.0 / 16.3.0
==================================================================================================

Input bitstream file:   bit_cut
Output synthesis file:  out.wav

Output sampling rate:   32000 Hz
Bitrate:                128.00 kbps
Input configuration:    Stereo
Output configuration:   Stereo

------ Running the decoder ------

Frames processed:       1279    ==1732836==WARNING: MemorySanitizer: use-of-uninitialized-value
    #0 0xb5a28d in getTCXWindowing /local/knj/ivas-codec/lib_dec/dec_prm.c:222:15
    #1 0x735f6c in dec_prm_tcx_sidebits /local/knj/ivas-codec/lib_dec/ivas_mdct_core_dec.c:162:5
    #2 0x7341b1 in ivas_mdct_dec_side_bits_frame_channel /local/knj/ivas-codec/lib_dec/ivas_mdct_core_dec.c:378:13
    #3 0x843f08 in stereo_mdct_core_dec /local/knj/ivas-codec/lib_dec/ivas_stereo_mdct_core_dec.c:222:9
    #4 0xc2a33c in ivas_core_dec /local/knj/ivas-codec/lib_dec/ivas_core_dec.c:417:17
    #5 0xc38e22 in ivas_cpe_dec /local/knj/ivas-codec/lib_dec/ivas_cpe_dec.c:364:24
    #6 0x5e8b5a in ivas_dec /local/knj/ivas-codec/lib_dec/ivas_dec.c:122:24
    #7 0x4b0ebe in IVAS_DEC_GetSamples /local/knj/ivas-codec/lib_dec/lib_dec.c:649:24
    #8 0x4a5c92 in decodeG192 /local/knj/ivas-codec/apps/decoder.c:1249:24
    #9 0x49ae8d in main /local/knj/ivas-codec/apps/decoder.c:522:17
    #10 0x7fb2a7ae9d09 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x23d09)
    #11 0x41f5a9 in _start (/local/knj/ivas-codec/CLANG1/IVAS_dec+0x41f5a9)

SUMMARY: MemorySanitizer: use-of-uninitialized-value /local/knj/ivas-codec/lib_dec/dec_prm.c:222:15 in getTCXWindowing
Exiting

Ways to reproduce

Get error pattern from https://forge.3gpp.org/rep/ivas-codec-pc/ivas-codec/-/jobs/44518/artifacts/file/ep_015.g192, then run

scripts/IvasBuildAndRunChecks.py --check CLANG1 -m stereo_b13_128_swb_rs -f ep_015.g192 -p ci_linux_ltv.json

which invokes these command lines:

./CLANG1/IVAS_cod -stereo -max_band swb ./scripts/switchPaths/sw_swb1.bin 32 ./CLANG1/pcm/ltv48_STEREO_32_STEREO.pcm ./CLANG1/enc/ltv48_STEREO_stereo_b13_128_swb_rs.192
./CLANG1/IVAS_dec STEREO 32 ./CLANG1/enc/ltv48_STEREO_stereo_b13_128_swb_rs_fer_ep_015.192 ./CLANG1/dec/ltv48_STEREO_stereo_b13_128_swb_rs_fer_ep_015.dec.STEREO.wav

Or use attached bitstream and do the decoder only:

make clean
make -j CLANG=1

./IVAS_dec stereo 32 bit_cut out.wav

bit_cut

Edited by Jan Kiene