Skip to content

USAN: index 8 out of bounds for type 'int16_t [8]' in ivas_jbm_dec.c for ISM4 to STEREO decoding

Basic info

Bug description

Clang USAN sanitizer test in pipeline found an error:

lib_dec/ivas_jbm_dec.c:2585:28: runtime error: index 8 out of bounds for type 'int16_t [8]'
SUMMARY: UndefinedBehaviorSanitizer: out-of-bounds-index lib_dec/ivas_jbm_dec.c:2585:28 in 

Link to test pipeline: https://forge.3gpp.org/rep/ivas-codec-pc/ivas-codec/-/jobs/241261

Ways to reproduce

Using the scripts:

dly_profile.dat

python3 scripts/IvasBuildAndRunChecks.py --checks CLANG3 -m ISM4_ball_fb_rs -p /path/to/my/local/ci_linux_ltv_local.json --usan_supp_file scripts/ubsan.supp -J dly_profile.dat --ism_metadata ltvISM1.csv ltvISM2.csv ltvISM3.csv ltvISM4.csv 

or directly:

make clean
make -j CLANG=3
./IVAS_cod -ism 4 ltvISM1.csv ltvISM2.csv ltvISM3.csv ltvISM4.csv -max_band fb scripts/switchPaths/sw_32k_384k.bin 48 ltv48_4ISM.wav bit
networkSimulator_g192 dly_profile.dat bit bit_err trace_dump 1
./IVAS_dec -voip stereo 48 bit_err out.wav