Skip to content

Stack corruption in ivas_mct_core_enc() in OSBA

Basic info

  • Fixed point:
    • Encoder (fixed): ae609fd0 (BASOP main)
    • Decoder (fixed):

Bug description

The encoder crashes in OSBA bitrate switching conditions. A similar problem likely exists in SBA.

For the command line below, a stack corruption is reported in frame 10.

Screenshot - 8_19_2025 , 8_43_41 AM.jpg

Observation: the issue is gone when

  • NONBE_FIX_1097_SBA_DTX_BRATE_SWITCHING_ENC is deactivated, or
  • the number of channels is patched for one buffer: powerSpecMsInv_long_fx[2 * MCT_MAX_CHANNELS - CPE_CHANNELS][L_FRAME48k]

Ways to reproduce

ivas_cod.exe -ism_sba 4 3 scripts/testv/stvISM1.csv scripts/testv/stvISM2.csv scripts/testv/stvISM3.csv scripts/testv/stvISM4.csv scripts/switchPaths/sw_13k2_512k.bin 32 scripts/testv/stvOSBA_4ISM_3OA32c.wav bit

Edited by vaclav