Overflow in FdCng_encodeSID_ivas_fx
Basic info
- Float reference:
- Encoder (float): 20250826_tag_characterization_testing_ivas-float-update
- Decoder (float):20250826_tag_characterization_testing_ivas-float-update
- Fixed point:
- Encoder (fixed): 20250826_tag_characterization_testing_main
- Decoder (fixed): 20250826_tag_characterization_testing_main
Bug description
When processing the characterization test items, the encoder crashes with the following command line:
/local/ivas-basop/IVAS_cod -dtx -ism 4 /local/ivas-processing-scripts/experiments/characterization/P800-11/proc_output/cat6/out_-26LKFS/preprocessing_2/cat6_concatenated.wav.0.csv /local/ivas-processing-scripts/experiments/characterization/P800-11/proc_output/cat6/out_-26LKFS/preprocessing_2/cat6_concatenated.wav.1.csv /local/ivas-processing-scripts/experiments/characterization/P800-11/proc_output/cat6/out_-26LKFS/preprocessing_2/cat6_concatenated.wav.2.csv /local/ivas-processing-scripts/experiments/characterization/P800-11/proc_output/cat6/out_-26LKFS/preprocessing_2/cat6_concatenated.wav.3.csv 32000 48 /local/ivas-processing-scripts/experiments/characterization/P800-11/proc_output/cat6/out_-26LKFS/preprocessing_2/cat6_concatenated.wav /local/ivas-processing-scripts/experiments/characterization/P800-11/proc_output/cat6/out_-26LKFS/tmp_c11/cat6_concatenated.ivas.192
the origin of the overflow is
#7 (closed) 0x00005555557244af in FdCng_encodeSID_ivas_fx (st=0x555555a8cbf0) at lib_enc/fd_cng_enc_fx.c:2472 2472 e_fx = L_add( e_fx, v_fx[i] ); // Q20
full stack trace
(gdb) bt
#0 __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at ./nptl/pthread_kill.c:44
#1 0x00007ffff7d6ff4f in __pthread_kill_internal (signo=6, threadid=<optimized out>) at ./nptl/pthread_kill.c:78
#2 0x00007ffff7d20fb2 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
#3 0x00007ffff7d0b472 in __GI_abort () at ./stdlib/abort.c:79
#4 0x00007ffff7d0b395 in __assert_fail_base (fmt=0x7ffff7e7fa90 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n",
assertion=assertion@entry=0x5555559a9792 "0", file=file@entry=0x5555559a9780 "lib_com/basop32.c", line=line@entry=1661,
function=function@entry=0x5555559a97d4 <__PRETTY_FUNCTION__.3> "L_add") at ./assert/assert.c:94
#5 0x00007ffff7d19ec2 in __GI___assert_fail (assertion=0x5555559a9792 "0", file=0x5555559a9780 "lib_com/basop32.c", line=1661,
function=0x5555559a97d4 <__PRETTY_FUNCTION__.3> "L_add") at ./assert/assert.c:103
#6 0x00005555557fdb8f in L_add (L_var1=-2087952373, L_var2=-84209421) at lib_com/basop32.c:1661
#7 0x00005555557244af in FdCng_encodeSID_ivas_fx (st=0x555555a8cbf0) at lib_enc/fd_cng_enc_fx.c:2472
#8 0x00005555556cfe80 in acelp_core_enc_ivas_fx (st=0x555555a8cbf0, inp=0x7fffffff7c10, A=0x7fffffff598a, Aw=0x7fffffff56da, epsP=0x7fffffff5564,
lsp_new=0x7fffffff54b0, lsp_mid=0x7fffffff5430, vad_hover_flag=0, attack_flag=0, bwe_exc_extended_fx=0x7ffffffe7a90, voice_factors_fx=0x7ffffffeaea0,
old_syn_12k8_16k=0x7ffffffe7590, q_old_syn_12k8_16=0x7ffffffe5b5a, pitch_buf=0x7ffffffe6aa0, unbits=0x7ffffffe6a9c, hStereoTD=0x0,
tdm_lsfQ_PCh=0x7ffffffe6a70, Q_new=10) at lib_enc/acelp_core_enc_fx.c:1035
#9 0x000055555575428b in ivas_core_enc_fx (hSCE=0x555555a8cb90, hCPE=0x0, hMCT=0x0, n_CoreChannels=1, old_inp_12k8_fx=0x7fffffff7b10,
old_inp_16k_fx=0x7fffffff6290, Q_new=0x7fffffff5baa, ener_fx=0x7fffffff5b94, A_fx=0x7fffffff598a, Aw_fx=0x7fffffff56da, epsP_fx=0x7fffffff5564,
epsP_fx_q=0x7fffffff551a, lsp_new_fx=0x7fffffff54b0, lsp_mid_fx=0x7fffffff5430, vad_hover_flag=0x7fffffff540a, attack_flag=0x7fffffff5402,
realBuffer_fx=0x7fffffff2700, imagBuffer_fx=0x7ffffffeeb00, q_re_im_buf=0x7ffffffedbfa, old_wsp_fx=0x7ffffffecd80, e_old_wsp=0x7ffffffec894,
loc_harm=0x7ffffffec84a, cor_map_sum_fx=0x7ffffffec842, vad_flag_dtx=0x7ffffffec83a, enerBuffer_fx=0x7ffffffec560, enerBuffer_fx_exp=0x7ffffffec46a,
fft_buff_fx=0x7ffffffeb860, tdm_SM_or_LRTD_Pri=0, ivas_format=3, flag_16k_smc=0) at lib_enc/ivas_core_enc_fx.c:326
#10 0x00005555555a1aae in ivas_ism_enc_fx (st_ivas=0x555555a6e2d0, data=0x7fffffff8770, q_data=11, input_frame=960, nb_bits_metadata=0x7fffffff881a,
flag_omasa_ener_brate=0) at lib_enc/ivas_ism_enc_fx.c:465
#11 0x000055555559a19e in ivas_enc_fx (st_ivas=0x555555a6e2d0, data=0x555555aaba90, n_samples=3840) at lib_enc/ivas_enc_fx.c:204
#12 0x000055555555f1d7 in IVAS_ENC_EncodeFrameToSerial (hIvasEnc=0x555555a6e2a0, inputBuffer=0x555555aaba90, inputBufferSize=3840,
outputBitStream=0x7fffffff8960, numOutBits=0x7fffffff895e) at lib_enc/lib_enc_fx.c:1509
#13 0x0000555555559dab in main (argc=12, argv=0x7fffffffdbe8) at apps/encoder.c:761
Ways to reproduce
Run the scripts with
python3 -m ivas_processing_scripts experiments/characterization/P800-11/config/P800-11_cat6_ISM4-26LKFS.yml