Skip to content

[MSAN Clang 18] use-of-uninitialized value in open_decoder_LPD

Basic info

  • Commit SHA: 32c65a1d
  • Platform: Linux, needs Clang 18

Bug description

There is an MSAN error in the decoder. This comes up, e.g., with MASA format input. See

==1368016==WARNING: MemorySanitizer: use-of-uninitialized-value
    #0 0x555555c9fd0b in open_decoder_LPD ivas-codec/lib_dec/core_dec_init.c:194:13
    #1 0x555555788b46 in init_decoder ivas-codec/lib_dec/init_dec.c:683:5
    #2 0x5555559fe2f7 in create_sce_dec ivas-codec/lib_dec/ivas_sce_dec.c:378:20
    #3 0x5555557c269c in ivas_init_decoder ivas-codec/lib_dec/ivas_init_dec.c:1618:28
    #4 0x5555557b8855 in ivas_dec_setup ivas-codec/lib_dec/ivas_init_dec.c:865:24
    #5 0x5555556670f6 in ivas_dec_setup_all ivas-codec/lib_dec/lib_dec.c:2081:28
    #6 0x555555663d54 in IVAS_DEC_GetSamplesDecoder ivas-codec/lib_dec/lib_dec.c:1136:24
    #7 0x555555643738 in decodeG192 ivas-codec/apps/decoder.c:2444:32
    #8 0x55555562b039 in main ivas-codec/apps/decoder.c:759:17
    #9 0x7ffff7c2a1c9 in __libc_start_call_main csu/../sysdeps/nptl/libc_start_call_main.h:58:16
    #10 0x7ffff7c2a28a in __libc_start_main csu/../csu/libc-start.c:360:3
    #11 0x55555558d5f4 in _start (ivas-codec/build-msan/IVAS_dec+0x395f4) (BuildId: 655fc18a236dd4e9e5c1c6f27b173af8046774a3)

SUMMARY: MemorySanitizer: use-of-uninitialized-value ivas-codec/lib_dec/core_dec_init.c:194:13 in open_decoder_LPD

Ways to reproduce

Make first MSAN build and then run the codec with this

./IVAS_cod -masa 1 ./scripts/testv/stv1MASA1TC48c.met 64000 48 ./scripts/testv/stv1MASA1TC48c.wav debug.bit
./IVAS_dec -fr 20 STEREO 48 debug.bit out.wav

MSAN build can be done, e.g., with

make CLANG=1 -j