USAN: OOB indexing in predict_signal function
Basic info
- Fixed point: 24e8bdab
Bug description
USAN found an out-of-bounds indexing:
lib_com/tcx_ltp_fx.c:404:12: runtime error: index 4 out of bounds for type 'const Word16 [4][4]'
#0 0x1063a4a in predict_signal /ivas-basop/lib_com/tcx_ltp_fx.c:404:12
#1 0x92207c in tcx_ltp_encode_ivas_fx /ivas-basop/lib_enc/tcx_ltp_enc_fx.c:1115:5
#2 0x9c0fb4 in core_signal_analysis_high_bitrate_ivas_fx /ivas-basop/lib_enc/ext_sig_ana_fx.c:592:9
#3 0x84a979 in stereo_tcx_core_enc /ivas-basop/lib_enc/ivas_tcx_core_enc_fx.c:379:5
#4 0xa1142c in ivas_core_enc_fx /ivas-basop/lib_enc/ivas_core_enc_fx.c:354:13
#5 0xac0fc4 in ivas_cpe_enc_fx /ivas-basop/lib_enc/ivas_cpe_enc_fx.c:1230:5
#6 0x485ea3 in ivas_enc_fx /ivas-basop/lib_enc/ivas_enc_fx.c:182:9
#7 0x43d5a8 in IVAS_ENC_EncodeFrameToSerial /ivas-basop/lib_enc/lib_enc_fx.c:1502:13
#8 0x42cf18 in main /ivas-basop/apps/encoder.c:877:28
#9 0x7f1d71a6cd8f in __libc_start_call_main csu/../sysdeps/nptl/libc_start_call_main.h:58:16
#10 0x7f1d71a6ce3f in __libc_start_main csu/../csu/libc-start.c:392:3
#11 0x4045b4 in _start (/ivas-basop/IVAS_cod+0x4045b4)
SUMMARY: UndefinedBehaviorSanitizer: out-of-bounds-index lib_com/tcx_ltp_fx.c:404:12 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 -stereo 32000 32 scripts/testv/stvST32n.wav bit