Skip to content

USAN "float-divide-by-zero" in strereo DFT with MASA DTX

Basic info

Bug description

Clang3 (USAN) sanitizer test in pipeline found an error:

lib_enc/ivas_stereo_dft_enc_itd.c:946:34: runtime error: division by zero
SUMMARY: UndefinedBehaviorSanitizer: float-divide-by-zero lib_enc/ivas_stereo_dft_enc_itd.c:946:34 in 
MASA inp. metadata file: ivas-pc-testfiles/ltv48_MASA2TC.met
Input audio file:       ltv48_MASA2TC_16_MASA2TC_L0-120_0s.pcm
Output bitstream file:  ltv48_MASA2TC_MASA_2TC_b24_4_dtx_wb_cbr.192

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

Ways to reproduce

Using the scripts:

python3 scripts/IvasBuildAndRunChecks.py --checks CLANGX -m MODE -p /path/to/my/local/ci_linux_ltv_local.json

or directly:

make clean
make -j CLANG=3
./IVAS_cod -masa 2 ivas-pc-testfiles/ltv48_MASA2TC.met -dtx -max_band wb 24400 16 ltv48_MASA2TC_16_MASA2TC_L0-120_0s.pcm ltv48_MASA2TC_MASA_2TC_b24_4_dtx_wb_cbr.192