USAN: NaN value in ISM2 bitrate switching
Basic info
- Commit SHA: 2f979d61
Bug description
Clang USAN sanitizer test in pipeline found an error:
ib_dec/syn_outp.c:112:16: runtime error: -nan is outside the range of representable values of type 'short'
SUMMARY: UndefinedBehaviorSanitizer: float-cast-overflow lib_dec/syn_outp.c:112:16 in
lib_com/tools.c:431:20: runtime error: -nan is outside the range of representable values of type 'short'
SUMMARY: UndefinedBehaviorSanitizer: float-cast-overflow lib_com/tools.c:431:20 in
lib_dec/core_switching_dec.c:426:53: runtime error: nan is outside the range of representable values of type 'int'
SUMMARY: UndefinedBehaviorSanitizer: float-cast-overflow lib_dec/core_switching_dec.c:426:53 in
lib_dec/core_switching_dec.c:426:53: runtime error: nan is outside the range of representable values of type 'int'
SUMMARY: UndefinedBehaviorSanitizer: float-cast-overflow lib_dec/core_switching_dec.c:426:53 in
Link to test pipeline: https://forge.3gpp.org/rep/ivas-codec-pc/ivas-codec/-/jobs/241259
Ways to reproduce
Using the scripts:
python3 scripts/IvasBuildAndRunChecks.py --checks CLANG3 -m ISM2_ball_swb_rs -p /path/to/my/local/ci_linux_ltv_local.json --usan_supp_file scripts/ubsan.supp --oc STEREO --ism_metadata ltvISM1.csv ltvISM2.csv -J dly_profile.dat
or directly:
make clean
make -j CLANG=3
./IVAS_cod -ism 2 ltvISM1.csv ltvISM2.csv -max_band swb scripts/switchPaths/sw_16k4_256k.bin 32 ltv32_2ISM.wav bit
networkSimulator_g192 dly_profile.dat bit bit_err trace_dump 1
./IVAS_dec -voip stereo 32 bit_err out.wav