Skip to content

USAN: division by zero in ivas_stereo_dft_enc_itd.c for OMASA encoding

Basic info

Bug description

Clang USAN sanitizer test in pipeline found an error:

lib_enc/ivas_stereo_dft_enc_itd.c:787:66: runtime error: division by zero
SUMMARY: UndefinedBehaviorSanitizer: float-divide-by-zero lib_enc/ivas_stereo_dft_enc_itd.c:787:66 in

Link to test pipeline: https://forge.3gpp.org/rep/ivas-codec-pc/ivas-codec/-/jobs/243442

Ways to reproduce

Using the scripts:

python3 scripts/IvasBuildAndRunChecks.py --checks CLANG3 -m OMASA_ISM2_1TC_b32_wb_cbr -p /path/to/my/local/ci_linux_ltv_local.json --usan_supp_file scripts/ubsan.supp --oc mono

or directly:

make clean
make -j CLANG=3
UBSAN_OPTIONS=suppressions=scripts/ubsan.supp,report_error_type=1,log_path=usan_log_catchall ./IVAS_cod -ism_masa 2 1 ltv48_OMASA_2ISM_1TC_ISM1.csv ltv48_OMASA_2ISM_1TC_ISM2.csv ltv48_OMASA_2ISM_1TC.met -max_band wb 32000 16 ltv16_OMASA_2ISM_1TC.wav bit