Skip to content

[CLANG18] MSAN: use-of-uninitialized-value in lib_com/ivas_tools.c:134:23

Basic Info

Bug description

Clang 18 MSAN found an use-of-uninitialized-value error at lib_com/ivas_tools.c:134:23:

==21034==WARNING: MemorySanitizer: use-of-uninitialized-value
#0 0x5585fb81ce03 in ivas_syn_output /builds/rep/ivas-codec-pc/ivas-codec/lib_com/ivas_tools.c:134:23
#1 0x5585facbe846 in ivas_jbm_dec_flush_renderer /builds/rep/ivas-codec-pc/ivas-codec/lib_dec/ivas_jbm_dec.c:1671:17
#2 0x5585fa98e0d4 in IVAS_DEC_ReadFormat /builds/rep/ivas-codec-pc/ivas-codec/lib_dec/lib_dec.c:1126:32
#3 0x5585fa95f9d3 in decodeVoIP /builds/rep/ivas-codec-pc/ivas-codec/apps/decoder.c:3572:32
#4 0x5585fa94e7a8 in main /builds/rep/ivas-codec-pc/ivas-codec/apps/decoder.c:786:17
#5 0x7fbc656581c9 in __libc_start_call_main csu/../sysdeps/nptl/libc_start_call_main.h:58:16
#6 0x7fbc6565828a in __libc_start_main csu/../csu/libc-start.c:360:3
#7 0x5585fa8b0634 in _start (/builds/rep/ivas-codec-pc/ivas-codec/IVAS_dec+0x3a634) (BuildId: c9233b4b3e6219af67cc626af872fea5873377d1)

SUMMARY: MemorySanitizer: use-of-uninitialized-value /builds/rep/ivas-codec-pc/ivas-codec/lib_com/ivas_tools.c:134:23 in ivas_syn_output

How to reproduce

⚠️ Make sure to use CLANG v18 for building the codec :warning

Build with

make clean
make -j CLANG=1

Then run

IVAS_cod -rtpdump 3 -scene_orientation scripts/testv/headrot_case01_3000_q.csv -device_orientation scripts/testv/headrot_case00_3000_q.csv -ism_masa 3 2 scripts/testv/stv20sOMASA_3ISM2TC_ISM1.csv scripts/testv/stv20sOMASA_3ISM2TC_ISM2.csv scripts/testv/stv20sOMASA_3ISM2TC_ISM3.csv scripts/testv/stv20sOMASA_3ISM2TC.met scripts/switchPaths/sw_13k2_512k_2fr_start_160k_omasatechs_3ism.bin 48 scripts/testv/stv20sOMASA_3ISM2TC.wav stv20sOMASA_3ISM2TC.wav_OMASA_vdir2TC_3ISM_at_br_sw_techs_13_2_to_512_kbps_start_160_kbps_48kHz_in_48kHz_out_BINAURAL_out_rtpdump_PI_data.192
IVAS_dec -fr 20 -VOIP_hf_only=1 BINAURAL 48 stv20sOMASA_3ISM2TC.wav_OMASA_vdir2TC_3ISM_at_br_sw_techs_13_2_to_512_kbps_start_160_kbps_48kHz_in_48kHz_out_BINAURAL_out_rtpdump_PI_data.192 stv20sOMASA_3ISM2TC.wav_OMASA_vdir2TC_3ISM_at_br_sw_techs_13_2_to_512_kbps_start_160_kbps_48kHz_in_48kHz_out_BINAURAL_out_rtpdump_PI_data.dec.wav

or

python3 -m pytest "test_param_file_tests[stv-OMASA vdir2TC 3ISM at br sw techs 13.2 to 512 kbps start 160 kbps, 48kHz in, 48kHz out, BINAURAL out, rtpdump, PI data]" -n auto --update_ref --ref_encoder_path ./IVAS_cod --ref_decoder_path ./IVAS_dec