Skip to content

USAN: index out of bounds in OSBA JBM decoding to mono and stereo with rate switching

Basic info

Bug description

Clang usan sanitizer test in pipeline found an error:

lib_dec/ivas_jbm_dec.c:2545: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:2545:28 in 

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

Ways to reproduce

Using the scripts:

JBM profile file is here: jbm_err_profile.dat

python3 scripts/IvasBuildAndRunChecks.py --checks CLANG3 -m OSBA_ISM2_FOA_ball_fb_rs -p /path/to/my/local/ci_linux_ltv_local.json --usan_supp_file scripts/ubsan.supp -J jbm_err_profile.dat

or directly:

make clean
make -j CLANG=3
./IVAS_cod -ism_sba 2 1 NULL NULL -max_band fb scripts/switchPaths/sw_13k2_512k.bin 48 ltv48_OSBA_2ISM_FOA.wav bit
networkSimulator jbm_err_profile.dat bit bit_jbm tracefile 2
./IVAS_dec -Tracefile tracefile -VOIP mono 48 bit_jbm out.wav