USAN: OOB indexing in tcx_ltp_pitch_search function (EVS)
Basic info
- Fixed point: 24e8bdab
Bug description
USAN found an out-of-bounds indexing:
lib_enc/tcx_ltp_enc_fx.c:206:18: runtime error: index -85 out of bounds for type 'Word32 [256]'
#0 0x91cca9 in tcx_ltp_pitch_search /ivas-basop/lib_enc/tcx_ltp_enc_fx.c:206:18
#1 0x9186a4 in tcx_ltp_encode_fx /ivas-basop/lib_enc/tcx_ltp_enc_fx.c:660:9
#2 0x97bd39 in core_acelp_tcx20_switching_fx /ivas-basop/lib_enc/core_enc_ol_fx.c:849:5
#3 0x8b6f6d in pre_proc_fx /ivas-basop/lib_enc/pre_proc_fx.c:1213:13
#4 0x46035a in evs_enc_fx /ivas-basop/lib_enc/evs_enc_fx.c:182:5
#5 0x43d56d in IVAS_ENC_EncodeFrameToSerial /ivas-basop/lib_enc/lib_enc_fx.c:1494:13
#6 0x42cf18 in main /ivas-basop/apps/encoder.c:877:28
#7 0x7f3513dd1d8f in __libc_start_call_main csu/../sysdeps/nptl/libc_start_call_main.h:58:16
#8 0x7f3513dd1e3f in __libc_start_main csu/../csu/libc-start.c:392:3
#9 0x4045b4 in _start (/ivas-basop/IVAS_cod+0x4045b4)
SUMMARY: UndefinedBehaviorSanitizer: out-of-bounds-index lib_enc/tcx_ltp_enc_fx.c:206:18 in
It needs to be checked if this is an actual bug or a somewhat "false positive" that is assigned, but never really used. In any case, it is preferable to fix this to have one less noise in the USAN error reports.
Ways to reproduce
make clean
make -j CLANG=3
IVAS_cod -stereo_dmx_evs 24400 48 scripts/testv/stvST48c.wav bit