USAN error in nelp.c for EVS mono
Basic info
- Commit SHA:
Bug description
Clang usan sanitizer test in pipeline found an error:
lib_com/nelp.c:124:36: runtime error: implicit conversion from type 'int' of value 135198 (32-bit, signed) to type 'int16_t' (aka 'short') changed the value to 4126 (16-bit, signed)
SUMMARY: UndefinedBehaviorSanitizer: implicit-signed-integer-truncation lib_com/nelp.c:124:36 in
Link to test pipeline: https://forge.3gpp.org/rep/ivas-codec-pc/ivas-codec/-/jobs/204419
Ways to reproduce
Using the scripts:
python3 scripts/IvasBuildAndRunChecks.py --checks CLANG3 -m mono_b05_13_dtx_nb_rs -p /path/to/my/local/ci_linux_ltv_local.json --usan_supp_file scripts/ubsan.supp
or directly:
make clean
make -j CLANG=3
./IVAS_cod -dtx -max_band nb scripts/switchPaths/sw_nb5.bin 8 ltv8_MONO.wav bit
./IVAS_dec 8 bit out.wav