[MSAN Clang 18] use-of-uninitialized value in ivas_mdct_core_invQ
Basic info
- Commit SHA: 32c65a1d
- Platform: Linux, needs Clang 18
Bug description
There is an MSAN error in the decoder. This comes up with MDCT core use and probably frame erasures. See
==1368073==WARNING: MemorySanitizer: use-of-uninitialized-value
#0 0x5be158fed187 in ivas_mdct_core_invQ ivas-codec/lib_dec/ivas_mdct_core_dec.c:775:17
#1 0x5be15918e39e in stereo_mdct_core_dec ivas-codec/lib_dec/ivas_stereo_mdct_core_dec.c:250:5
#2 0x5be1594678ea in ivas_core_dec ivas-codec/lib_dec/ivas_core_dec.c:400:17
#3 0x5be1594846bf in ivas_cpe_dec ivas-codec/lib_dec/ivas_cpe_dec.c:435:24
#4 0x5be158efd1e0 in ivas_jbm_dec_tc ivas-codec/lib_dec/ivas_jbm_dec.c:126:24
#5 0x5be158d47057 in IVAS_DEC_GetSamplesDecoder ivas-codec/lib_dec/lib_dec.c:1154:28
#6 0x5be158d26738 in decodeG192 ivas-codec/apps/decoder.c:2444:32
#7 0x5be158d0e039 in main ivas-codec/apps/decoder.c:759:17
#8 0x79a0b482a1c9 in __libc_start_call_main csu/../sysdeps/nptl/libc_start_call_main.h:58:16
#9 0x79a0b482a28a in __libc_start_main csu/../csu/libc-start.c:360:3
#10 0x5be158c705f4 in _start (ivas-codec/build-msan/IVAS_dec+0x395f4) (BuildId: 655fc18a236dd4e9e5c1c6f27b173af8046774a3)
SUMMARY: MemorySanitizer: use-of-uninitialized-value ivas-codec/lib_dec/ivas_mdct_core_dec.c:775:17 in ivas_mdct_core_invQ
Ways to reproduce
Make first MSAN build and then run the codec with this
./IVAS_cod -stereo 128000 16 ./scripts/testv/stvST16c.wav debug.bit
./scripts/tools/Linux/eid-xor -fer -vbr -bs g192 -ep g192 debug.bit ./scripts/dly_error_profiles/ep_10pct.g192 debug_fer.bit
./IVAS_dec -fr 20 STEREO 16 debug_fer.bit out.wav
Another variant of this is probably this
./IVAS_cod -mc 5_1 384000 48 ./scripts/testv/stv51MC48c.wav debug.bit
./scripts/tools/Linux/networkSimulator_g192 scripts/dly_error_profiles/dly_error_profile_5.dat debug.bit debug_netsim.bit debug.netsimtrace 2 0
./IVAS_dec -fr 20 -no_delay_cmp -Tracefile debug.dectrace -VOIP 7_1_4 48 debug_netsim.bit out.wav
MSAN build can be done, e.g., with
make CLANG=1 -j