[CLANG18] MSAN: use-of-uninitialized-value in lib_dec/hq_hr_dec_fx.c:632:5
# Basic info <!--- Add commit SHA used to reproduce --> - Fixed point: - Encoder (fixed): n/a - Decoder (fixed): 20caaf8d402aa11e312058d8323dfbb2f60283ce (branch basop-2383-clang18-msan-use-of-uninitialized-value-in-lib_dec-dec_tcx_fx-c-1098-13) ⚠️ **Note: This is a follow-up to #2283, and needs to have the patch from !2771 in place!** ⚠️ # Bug description MSAN reports use-of-uninitialized-value in hq_hr_dec_fx.c, line 632: ``` ==4028368==WARNING: MemorySanitizer: use-of-uninitialized-value #0 0x5589eb2d2b5e in hq_hr_dec_fx /home/ame-tmp2/mul/ivas/basop/issue_2382/ivas-basop/lib_dec/hq_hr_dec_fx.c:632:5 #1 0x5589eb2b5d7b in hq_core_dec_fx /home/ame-tmp2/mul/ivas/basop/issue_2382/ivas-basop/lib_dec/hq_core_dec_fx.c:211:13 #2 0x5589eb20917a in evs_dec_fx /home/ame-tmp2/mul/ivas/basop/issue_2382/ivas-basop/lib_dec/evs_dec_fx.c:340:13 #3 0x5589eafb86c9 in evs_dec_main_fx /home/ame-tmp2/mul/ivas/basop/issue_2382/ivas-basop/lib_dec/lib_dec_fx.c:5609:13 #4 0x5589eafb45f3 in IVAS_DEC_GetSamplesDecoder /home/ame-tmp2/mul/ivas/basop/issue_2382/ivas-basop/lib_dec/lib_dec_fx.c:3889:13 #5 0x5589eaf5e62e in decodeG192 /home/ame-tmp2/mul/ivas/basop/issue_2382/ivas-basop/apps/decoder.c:2290:32 #6 0x5589eaf43fc1 in main /home/ame-tmp2/mul/ivas/basop/issue_2382/ivas-basop/apps/decoder.c:684:17 #7 0x7f2383759d79 in __libc_start_main csu/../csu/libc-start.c:308:16 #8 0x5589eaea7479 in _start (/home/ame-tmp2/mul/ivas/basop/issue_2382/ivas-basop/IVAS_dec+0x3b479) (BuildId: 0d1bef7ce978521cb5b4e892842b205497b175e6) ``` The culprit seems to be `hq_generic_offset`, which is not set in all cases inside `hq_configure_evs_fx()`. # Ways to reproduce <!-- Commandline or script --> Bitstream: [stvST48c.wav_Stereo_downmix_to_bit_exact_EVS_at_24400_kbps_48kHz_in_48kHz_out.192](/uploads/82ff7efe6eb3a9a5844a69c01eea2d3a/stvST48c.wav_Stereo_downmix_to_bit_exact_EVS_at_24400_kbps_48kHz_in_48kHz_out.192) ```bash make CLANG=1 -j IVAS_dec 48 stvST48c.wav_Stereo_downmix_to_bit_exact_EVS_at_24400_kbps_48kHz_in_48kHz_out.192 out.wav ``` <!--- Below are labels that will be added but are not shown in description. This is a template to help fill them. Add further information to the first row and remove and add labels as necessary. -->
issue