Skip to content

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

Basic info

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

Bug description

There is an MSAN error in the encoder when rate switching is used with MASA format input. See

==1311713==WARNING: MemorySanitizer: use-of-uninitialized-value
    #0 0x5fbd34397df0 in writeLPCparam ivas-codec/lib_enc/enc_prm.c:268:30
    #1 0x5fbd340c5358 in stereo_tcx_core_enc ivas-codec/lib_enc/ivas_tcx_core_enc.c:403:5
    #2 0x5fbd344468b0 in ivas_core_enc ivas-codec/lib_enc/ivas_core_enc.c:254:13
    #3 0x5fbd3448b83a in ivas_cpe_enc ivas-codec/lib_enc/ivas_cpe_enc.c:716:20
    #4 0x5fbd33e9e990 in ivas_enc ivas-codec/lib_enc/ivas_enc.c:262:28
    #5 0x5fbd33de734c in IVAS_ENC_EncodeFrameToSerial ivas-codec/lib_enc/lib_enc.c:1342:24
    #6 0x5fbd33dc91ba in main ivas-codec/apps/encoder.c:760:24
    #7 0x7ac51f82a1c9 in __libc_start_call_main csu/../sysdeps/nptl/libc_start_call_main.h:58:16
    #8 0x7ac51f82a28a in __libc_start_main csu/../csu/libc-start.c:360:3
    #9 0x5fbd33d2a5d4 in _start (ivas-codec/build-msan/IVAS_cod+0x375d4) (BuildId: e2793d06260beffda644c80e238962947fa9b65f)

SUMMARY: MemorySanitizer: use-of-uninitialized-value ivas-codec/lib_enc/enc_prm.c:268:30 in writeLPCparam

Ways to reproduce

Make first MSAN build and then run the codec with this

./IVAS_cod -masa 2 ./scripts/testv/stv2MASA2TC48c.met ./scripts/switchPaths/sw_13k2_512k.bin 48 ./scripts/testv/stv2MASA2TC48c.wav debug.bit

or this also results in the same MSAN error

./IVAS_cod -stereo 32000 16 ./scripts/testv/stvST16c.wav debug.bit

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

make CLANG=1 -j
Edited by Tapani Pihlajakuja