Skip to content

USAN: NaN value in OSBA to BINAURAL_ROOM_REVERB rendering

Basic info

Bug description

Clang usan sanitizer test in pipeline found an error:

lib_dec/ivas_binRenderer_internal.c:1244:59: runtime error: index 11 out of bounds for type 'const float [11]'
SUMMARY: UndefinedBehaviorSanitizer: out-of-bounds-index lib_dec/ivas_binRenderer_internal.c:1244:59 in 
lib_com/tools.c:429:20: runtime error: nan is outside the range of representable values of type 'short'
SUMMARY: UndefinedBehaviorSanitizer: float-cast-overflow lib_com/tools.c:429:20 in 

The first one is related to #935 (closed). The second one is new, but also might actually be caused by the first one.

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

Ways to reproduce

Using the scripts:

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

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
./IVAS_dec BINAURAL_ROOM_REVERB 48 bit out.wav