USAN: SEGV in lib_com/tools_fx.c:3670:16
Basic Info
- Commit SHA: 187213dc
Bug description
USAN found an SEGV error at lib_com/tools_fx.c:3670:16:
==20160==ERROR: UndefinedBehaviorSanitizer: SEGV on unknown address (pc 0x0000010021e4 bp 0x7ffd8755feb0 sp 0x7ffd8755fe90 T20160)
==20160==The signal is caused by a READ memory access.
==20160==Hint: this fault was caused by a dereference of a high value address (see register values below). Disassemble the provided pc to learn which register was used.
#0 0x10021e4 in Copy_Scale_sig32_16 /builds/rep/sa4/audio/ivas-basop/lib_com/tools_fx.c:3670:16
#1 0xa07706 in ivas_compute_core_buffers_fx /builds/rep/sa4/audio/ivas-basop/lib_enc/ivas_core_pre_proc_fx.c:1160:9
#2 0x9fb70f in pre_proc_ivas_fx /builds/rep/sa4/audio/ivas-basop/lib_enc/ivas_core_pre_proc_fx.c:618:9
#3 0x9ab3d5 in ivas_core_enc_fx /builds/rep/sa4/audio/ivas-basop/lib_enc/ivas_core_enc_fx.c:238:9
#4 0xa5d6e2 in ivas_cpe_enc_fx /builds/rep/sa4/audio/ivas-basop/lib_enc/ivas_cpe_enc_fx.c:1283:5
#5 0x476fe1 in ivas_enc_fx /builds/rep/sa4/audio/ivas-basop/lib_enc/ivas_enc_fx.c:284:13
#6 0x43d598 in IVAS_ENC_EncodeFrameToSerial /builds/rep/sa4/audio/ivas-basop/lib_enc/lib_enc_fx.c:1502:13
#7 0x42cf08 in main /builds/rep/sa4/audio/ivas-basop/apps/encoder.c:877:28
#8 0x7f0cbfc6fd8f in __libc_start_call_main csu/../sysdeps/nptl/libc_start_call_main.h:58:16
#9 0x7f0cbfc6fe3f in __libc_start_main csu/../csu/libc-start.c:392:3
#10 0x4045a4 in _start (/builds/rep/sa4/audio/ivas-basop/IVAS_cod+0x4045a4)
UndefinedBehaviorSanitizer can not provide additional info.
SUMMARY: UndefinedBehaviorSanitizer: SEGV /builds/rep/sa4/audio/ivas-basop/lib_com/tools_fx.c:3670:16 in Copy_Scale_sig32_16
How to reproduce
Note that even though this seems to be a segfault, this needs USAN to be triggered - at least on the Linux runner platform. I did not test on others.
Build with
make clean
make -j CLANG=3
export UBSAN_OPTIONS=report_error_type=1,print_stacktrace=1
Then run
IVAS_cod -masa 2 scripts/testv/ltv48_MASA2TC.met scripts/switchPaths/sw_13k2_512k.bin 48 scripts/testv/ltv48_MASA2TC.wav ltv48_MASA2TC.wav_MASA_2TC_bitrate_switching_from_13_2_kbps_to_512_kbps_48kHz_in_48kHz_out_7_1_out.192
or
python3 -m pytest "test_param_file_tests[ltv-MASA 2TC bitrate switching from 13.2 kbps to 512 kbps, 48kHz in, 48kHz out, 7_1 out]" -n auto --update_ref --ref_encoder_path ./IVAS_cod --ref_decoder_path ./IVAS_dec
Edited by Jan Kiene