MSAN: use-of-uninitialized-value in stereo_dft_quantize_res_gains
Basic info
- Commit SHA: 6941acb1
Bug description
Clang MSAN sanitizer test in pipeline found an error:
==9974==WARNING: MemorySanitizer: use-of-uninitialized-value
#0 0xb857b5 in stereo_dft_quantize_res_gains /ivas-codec/lib_enc/ivas_stereo_dft_enc.c:132:10
#1 0xb83fce in stereo_dft_cng_side_gain /ivas-codec/lib_enc/ivas_stereo_cng_enc.c:424:17
#2 0xb131cb in ivas_cpe_enc /ivas-codec/lib_enc/ivas_cpe_enc.c:648:17
#3 0x574bc4 in ivas_enc /ivas-codec/lib_enc/ivas_enc.c:262:28
#4 0x4c6dab in IVAS_ENC_EncodeFrameToSerial /ivas-codec/lib_enc/lib_enc.c:1342:24
#5 0x4a7ea5 in main /ivas-codec/apps/encoder.c:882:28
#6 0x7f33f2b23d8f in __libc_start_call_main csu/../sysdeps/nptl/libc_start_call_main.h:58:16
#7 0x7f33f2b23e3f in __libc_start_main csu/../csu/libc-start.c:392:3
#8 0x421534 in _start (/ivas-codec/IVAS_cod+0x421534)
SUMMARY: MemorySanitizer: use-of-uninitialized-value /ivas-codec/lib_enc/ivas_stereo_dft_enc.c:132:10 in stereo_dft_quantize_res_gains
Link to test pipeline: https://forge.3gpp.org/rep/ivas-codec-pc/ivas-codec/-/jobs/673420
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.
or directly:
make clean
make -j CLANG=1
./IVAS_cod -dtx -masa 2 scripts/testv/ltv48_MASA2TC.met /ivas-codec/scripts/switchPaths/sw_13k2_512k.bin 48 scripts/testv/ltv48_MASA2TC.wav bit