USAN: OOB indexing in Inverse_Transform function
Basic info
- Fixed point: 24e8bdab
Bug description
USAN found an out-of-bounds indexing:
lib_com/trans_inv_fx.c:1035:33: runtime error: index -40 out of bounds for type 'Word32 [960]'
#0 0x10b7a85 in Inverse_Transform /ivas-basop/lib_com/trans_inv_fx.c:1035:33
#1 0x46b72e in hq_core_enc_ivas_fx /ivas-basop/lib_enc/hq_core_enc_fx.c:597:9
#2 0xa141bb in ivas_core_enc_fx /ivas-basop/lib_enc/ivas_core_enc_fx.c:406:13
#3 0xac0fc4 in ivas_cpe_enc_fx /ivas-basop/lib_enc/ivas_cpe_enc_fx.c:1230:5
#4 0x485ea3 in ivas_enc_fx /ivas-basop/lib_enc/ivas_enc_fx.c:182:9
#5 0x43d5a8 in IVAS_ENC_EncodeFrameToSerial /ivas-basop/lib_enc/lib_enc_fx.c:1502:13
#6 0x42cf18 in main /ivas-basop/apps/encoder.c:877:28
#7 0x7f1d71a6cd8f in __libc_start_call_main csu/../sysdeps/nptl/libc_start_call_main.h:58:16
#8 0x7f1d71a6ce3f 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_com/trans_inv_fx.c:1035:33 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 32000 32 scripts/testv/stvST32n.wav bit