Skip to content

[CLANG18] MSAN: use-of-uninitialized-value in lib_enc/ivas_core_pre_proc_fx.c:1130:9

Basic Info

Bug description

Clang 18 MSAN found an use-of-uninitialized-value error at lib_com/tools_fx.c:1984:21:

==37506==WARNING: MemorySanitizer: use-of-uninitialized-value
#0 0x563e8c77e9fd in maximum_abs_32_fx /ivas-basop/lib_com/tools_fx.c:1984:21
#1 0x563e8bc1b259 in ivas_compute_core_buffers_fx /ivas-basop/lib_enc/ivas_core_pre_proc_fx.c:1130:9
#2 0x563e8bc1123d in pre_proc_ivas_fx /ivas-basop/lib_enc/ivas_core_pre_proc_fx.c:618:9
#3 0x563e8bbcd402 in ivas_core_enc_fx /ivas-basop/lib_enc/ivas_core_enc_fx.c:238:9
#4 0x563e8bc54d4b in ivas_cpe_enc_fx /ivas-basop/lib_enc/ivas_cpe_enc_fx.c:1273:5
#5 0x563e8b2813cf in ivas_enc_fx /ivas-basop/lib_enc/ivas_enc_fx.c:435:9
#6 0x563e8b177675 in IVAS_ENC_EncodeFrameToSerial /ivas-basop/lib_enc/lib_enc_fx.c:1502:13
#7 0x563e8b15694a in main /ivas-basop/apps/encoder.c:877:28
#8 0x7f0d8aab41c9 in __libc_start_call_main csu/../sysdeps/nptl/libc_start_call_main.h:58:16
#9 0x7f0d8aab428a in __libc_start_main csu/../csu/libc-start.c:360:3
#10 0x563e8b0b6454 in _start (/ivas-basop/IVAS_cod+0x38454) (BuildId: 789f3dc0ffff33f27110c73bbbf592b3990dac4e)

SUMMARY: MemorySanitizer: use-of-uninitialized-value /ivas-basop/lib_com/tools_fx.c:1984:21 in maximum_abs_32_fx

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 -ism_masa 4 2 scripts/testv/stv20sOMASA_4ISM2TC_ISM1.csv scripts/testv/stv20sOMASA_4ISM2TC_ISM2.csv scripts/testv/stv20sOMASA_4ISM2TC_ISM3.csv scripts/testv/stv20sOMASA_4ISM2TC_ISM4.csv scripts/testv/stv20sOMASA_4ISM2TC.met scripts/switchPaths/sw_13k2_512k_2fr_start_384k_omasatechs_4ism.bin 48 scripts/testv/stv20sOMASA_4ISM2TC.wav stv20sOMASA_4ISM2TC.wav_OMASA_vdir2TC_4ISM_at_br_sw_techs_13_2_to_512_kbps_start_384_kbps_48kHz_in_48kHz_out_BINAURAL_ROOM_REVERB_out.192

or

python3 -m pytest "test_param_file_tests[stv-OMASA vdir2TC 4ISM at br sw techs 13.2 to 512 kbps start 384 kbps, 48kHz in, 48kHz out, BINAURAL_ROOM_REVERB out]" -n auto --update_ref --ref_encoder_path ./IVAS_cod --ref_decoder_path ./IVAS_dec
Edited by Jan Kiene