Some ISM modes crash in instrumented codec build, but not in normal build
In the automated complexity tests, some ISM+ modes crash. The appropriate reporting is missing, so this went by unnoticed until now, see log here: https://forge.3gpp.org/rep/ivas-codec-pc/ivas-codec/-/jobs/104468.
When testing one locally, I could reproduce the crash with:
bash scripts/prepare_instrumentation.sh
make -j -C scripts/c-code-instrumented
./scripts/c-code_instrument/IVAS_cod -dtx -ism 2 NULL NULL -max_band fb 96000 48 ivas-pc-testfiles/ltv48_2ISM.wav bit_instrumented
and got this result:
=================================================================================================
IVAS Codec Baseline
Based on EVS Codec (Floating Point) 3GPP TS26.443 Nov 04, 2021,
Version 12.14.0 / 13.10.0 / 14.6.0 / 15.4.0 / 16.3.0
==================================================================================================
Object 1 input metadata: (null)
Object 2 input metadata: (null)
Input audio file: /local/knj/ivas-pc-testfiles/ltv48_2ISM.wav
Output bitstream file: bit_instrumented
Max. encoded bandwidth: FB
Input sampling rate: 48000 Hz
Bitrate: 96.00 kbps
IVAS format: ISM (2 streams)
DTX: ON, CNG update interval = 8 frames
------ Running the encoder ------
IVAS_cod: lib_enc/ACcontextMapping_enc.c:1012: RCcontextMapping_encode2_no_mem_s17_LCS: Assertion `bp + k <= nbbits' failed.
fish: “./scripts/c-code_instrument/IVA…” terminated by signal SIGABRT (Abort)
The issue is not there when running the codec without instrumentation and also not when running without instrumentation and with CLANG msan or asan, so this might hint at a bug in either the wmc_tool or the associated instrumentation code in the codec.
Build was done on Debian 11 with gcc --version
giving gcc (Debian 10.2.1-6) 10.2.1 20210110
Edited by Jan Kiene