[MSAN Clang 18] use-of-uninitialized value in ivas_init_decoder
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
==1369176==WARNING: MemorySanitizer: use-of-uninitialized-value
#0 0x5555557bd8a9 in ivas_init_decoder ivas-codec/lib_dec/ivas_init_dec.c:1404:24
#1 0x55555565f003 in IVAS_DEC_FeedFrame_Serial ivas-codec/lib_dec/lib_dec.c:836:28
#2 0x555555642f7d in decodeG192 ivas-codec/apps/decoder.c:2416:32
#3 0x55555562b039 in main ivas-codec/apps/decoder.c:759:17
#4 0x7ffff7c2a1c9 in __libc_start_call_main csu/../sysdeps/nptl/libc_start_call_main.h:58:16
#5 0x7ffff7c2a28a in __libc_start_main csu/../csu/libc-start.c:360:3
#6 0x55555558d5f4 in _start (ivas-codec/build-msan/IVAS_dec+0x395f4) (BuildId: 655fc18a236dd4e9e5c1c6f27b173af8046774a3)
SUMMARY: MemorySanitizer: use-of-uninitialized-value ivas-codec/lib_dec/ivas_init_dec.c:1404:24 in ivas_init_decoder
and another variant is
==1368628==WARNING: MemorySanitizer: use-of-uninitialized-value
#0 0x5555557bd8a9 in ivas_init_decoder ivas-codec/lib_dec/ivas_init_dec.c:1404:24
#1 0x55555565f003 in IVAS_DEC_FeedFrame_Serial ivas-codec/lib_dec/lib_dec.c:836:28
#2 0x555555642f7d in decodeG192 ivas-codec/apps/decoder.c:2416:32
#3 0x55555562b039 in main ivas-codec/apps/decoder.c:759:17
#4 0x7ffff7c2a1c9 in __libc_start_call_main csu/../sysdeps/nptl/libc_start_call_main.h:58:16
#5 0x7ffff7c2a28a in __libc_start_main csu/../csu/libc-start.c:360:3
#6 0x55555558d5f4 in _start (ivas-codec/build-msan/IVAS_dec+0x395f4) (BuildId: 655fc18a236dd4e9e5c1c6f27b173af8046774a3)
SUMMARY: MemorySanitizer: use-of-uninitialized-value ivas-codec/lib_dec/ivas_init_dec.c:1404:24 in ivas_init_decoder
Ways to reproduce
Make first MSAN build and then run the codec with this
./IVAS_cod 64000 48 ./scripts/testv/stv48c.wav debug.bit
./IVAS_dec -fr 20 -non_diegetic_pan -50 48 debug.bit out.wav
Another variant of this is probably this
./IVAS_cod -stereo_dmx_evs 13200 32 ./scripts/testv/stvST32c.wav debug.bit
./IVAS_dec -fr 20 32 debug.bit out.wav
MSAN build can be done, e.g., with
make CLANG=1 -j