Sanitizer error in ivas_mdct_core_reconstruct_fx on latest main
# Basic info <!--- Add commit SHA used to reproduce --> - Fixed point: - Encoder (fixed): 8d9744247e63b98780916bfada6830909c557da6 - Decoder (fixed): 8d9744247e63b98780916bfada6830909c557da6 # Bug description Pipeline here https://forge.3gpp.org/rep/sa4/audio/ivas-basop/-/pipelines/60737 Problem seems to be in decoder based on trace and this happens in many cases. ``` ==3429559==ERROR: AddressSanitizer: stack-buffer-overflow on address 0x7ffc7da35c10 at pc 0x000000f3b128 bp 0x7ffc7da34ac0 sp 0x7ffc7da34ab8 READ of size 2 at 0x7ffc7da35c10 thread T0 #0 0xf3b127 in getScaleFactor16 /home/gitlab-runner/builds/bEjdNXPsS/0/rep/sa4/audio/ivas-basop/lib_com/basop_util.c:737:14 #1 0x86c3ab in ivas_mdct_core_reconstruct_fx /home/gitlab-runner/builds/bEjdNXPsS/0/rep/sa4/audio/ivas-basop/lib_dec/ivas_mdct_core_dec_fx.c:1271:25 #2 0x99bfbd in stereo_mdct_core_dec_fx /home/gitlab-runner/builds/bEjdNXPsS/0/rep/sa4/audio/ivas-basop/lib_dec/ivas_stereo_mdct_core_dec_fx.c:491:5 #3 0xe1b1de in ivas_core_dec_fx /home/gitlab-runner/builds/bEjdNXPsS/0/rep/sa4/audio/ivas-basop/lib_dec/ivas_core_dec_fx.c:716:17 #4 0xe2f765 in ivas_cpe_dec_fx /home/gitlab-runner/builds/bEjdNXPsS/0/rep/sa4/audio/ivas-basop/lib_dec/ivas_cpe_dec_fx.c:609:9 #5 0x79e76a in ivas_jbm_dec_tc_fx /home/gitlab-runner/builds/bEjdNXPsS/0/rep/sa4/audio/ivas-basop/lib_dec/ivas_jbm_dec_fx.c:148:9 #6 0x4f9b09 in IVAS_DEC_GetTcSamples /home/gitlab-runner/builds/bEjdNXPsS/0/rep/sa4/audio/ivas-basop/lib_dec/lib_dec_fx.c:1835:9 #7 0x4f455e in IVAS_DEC_GetSamples /home/gitlab-runner/builds/bEjdNXPsS/0/rep/sa4/audio/ivas-basop/lib_dec/lib_dec_fx.c:1185:9 #8 0x4e3d08 in decodeG192 /home/gitlab-runner/builds/bEjdNXPsS/0/rep/sa4/audio/ivas-basop/apps/decoder.c:2134:32 #9 0x4d3987 in main /home/gitlab-runner/builds/bEjdNXPsS/0/rep/sa4/audio/ivas-basop/apps/decoder.c:688:17 #10 0x7fddc69a4d8f in __libc_start_call_main csu/../sysdeps/nptl/libc_start_call_main.h:58:16 #11 0x7fddc69a4e3f in __libc_start_main csu/../csu/libc-start.c:392:3 #12 0x41f3b4 in _start (/home/gitlab-runner/builds/bEjdNXPsS/0/rep/sa4/audio/ivas-basop/IVAS_dec+0x41f3b4) ``` # Ways to reproduce One case I verified locally is this <!-- Commandline or script --> ```bash ./IVAS_cod -max_band /testv/ivas_bws_20fr_start_SWB.txt -sba 3 512000 48 /testv/stv3OA48c.wav debug.bit ./IVAS_dec BINAURAL 48 bit out.wav ``` but tests show hundreds of cases <!--- Below are labels that will be added but are not shown in description. This is a template to help fill them. Add further information to the first row and remove and add labels as necessary. -->
issue