MSAN/Crash: Segfault when decoding OMASA JBM with rate switching to BINAURAL
Running
./IVAS_dec -t head_rot_traj.csv -exof exof_traj.csv -otr avg -VOIP BINAURAL 48 ltv48_OMASA_1ISM_1TC_OMASA_ISM1_1TC_ball_fb_rs_jbm_dly_profile_dat.192 out.wav
with attached files: omasa_segfault_files.zip
results in a crash due to a segfault:
==================================================================================================
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: /ivas-codec/CLANG3/enc/ltv48_OMASA_1ISM_1TC_OMASA_ISM1_1TC_ball_fb_rs_jbm_dly_profile_dat.192
Output synthesis file: /ivas-codec/CLANG3/dec/ltv48_OMASA_1ISM_1TC_OMASA_ISM1_1TC_ball_fb_rs_jbm_dly_profile_dat.dec.BINAURAL.wav
Output sampling rate: 48000 Hz
Output configuration: Binaural: no room
Render framesize: 20ms
Head rotation: ON
External orientation: ON
Orientation tracking: AVG
TSM mode: ON
JBM trace file: /ivas-codec/CLANG3/dec/ltv48_OMASA_1ISM_1TC_OMASA_ISM1_1TC_ball_fb_rs_jbm_dly_profile_dat.dec.BINAURAL.wav.tracefile_dec
------ Running the decoder ------
Frames processed: 4606 Segmentation fault (core dumped)
This was found from the sanitizer pipeline: https://forge.3gpp.org/rep/ivas-codec-pc/ivas-codec/-/jobs/345115.
Clang Msan reports:
==3130==WARNING: MemorySanitizer: use-of-uninitialized-value
#0 0x899d36 in ivas_td_binaural_renderer_sf /ivas-codec/lib_dec/ivas_objectRenderer_internal.c:178:72
#1 0x7ce6fd in ivas_jbm_dec_flush_renderer /ivas-codec/lib_dec/ivas_jbm_dec.c:1692:36
#2 0x4da3bd in IVAS_DEC_ReadFormat /ivas-codec/lib_dec/lib_dec.c:1060:32
#3 0x4b3009 in decodeVoIP /ivas-codec/apps/decoder.c:3480:32
#4 0x4a4e10 in main /ivas-codec/apps/decoder.c:874:17
#5 0x7f49a168bd8f in __libc_start_call_main csu/../sysdeps/nptl/libc_start_call_main.h:58:16
#6 0x7f49a168be3f in __libc_start_main csu/../csu/libc-start.c:392:3
#7 0x421534 in _start (/ivas-codec/CLANG1/IVAS_dec+0x421534)