Skip to content

MSAN: use-of-uninitialized-value in core_enc_2div.c:243:5

Basic info

Bug description

Clang MSAN sanitizer test in pipeline found an error:

==3147==WARNING: MemorySanitizer: use-of-uninitialized-value
    #0 0x564d33c53f9a in core_encode_twodiv /ivas-codec/lib_enc/core_enc_2div.c:243:5
    #1 0x564d3396ab2a in enc_acelp_tcx_main /ivas-codec/lib_enc/enc_acelp_tcx_main.c:96:13
    #2 0x564d3343c8cf in evs_enc /ivas-codec/lib_enc/evs_enc.c:298:9
    #3 0x564d333d78f4 in IVAS_ENC_EncodeFrameToSerial /ivas-codec/lib_enc/lib_enc.c:1348:28
    #4 0x564d333b7b04 in main /ivas-codec/apps/encoder.c:882:28
    #5 0x7f7e04de21c9 in __libc_start_call_main csu/../sysdeps/nptl/libc_start_call_main.h:58:16
    #6 0x7f7e04de228a in __libc_start_main csu/../csu/libc-start.c:360:3
    #7 0x564d33317614 in _start (/ivas-codec/CLANG1/IVAS_cod+0x38614) (BuildId: e8061202b9dca9c4ed61dcb83b95b44363bb4e43)

SUMMARY: MemorySanitizer: use-of-uninitialized-value /ivas-codec/lib_enc/core_enc_2div.c:243:5 in core_encode_twodiv

Link to test pipeline: https://forge.3gpp.org/rep/ivas-codec-pc/ivas-codec/-/jobs/725037

Ways to reproduce

Activate origin-tracking (more detailed traceback about where the undefined value came from) by appending

 -fsanitize-memory-track-origins

in the Makefile at lines 71 and 72. Note that this may increase runtime heavily.

Using the scripts:

python3 scripts/IvasBuildAndRunChecks.py --checks CLANG1 -m mono_b128_fb_cbr -p /path/to/my/local/ci_linux_ltv_local.json

or directly:

make clean
make -j CLANG=1
./IVAS_cod -max_band fb 128000 48 ltv48_MONO.wav bit