Skip to content

FOA bitrate switching decoding crashes in in ivas_spar_to_dirac

When running

./IVAS_cod -sba 1 -max_band fb scripts/switchPaths/sw_13k2_512k.bin 48 ivas-pc-testfiles/ltv48_FOA.wav bit
./IVAS_dec FOA 48 bit out_foa.wav

the decoder crashes with a SEGFAULT. With asan, one gets this traceback:

AddressSanitizer:DEADLYSIGNAL
=================================================================
==25813==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000090 (pc 0x00010812a44d bp 0x7ff7b8214f30 sp 0x7ff7b8213ce0 T0)
==25813==The signal is caused by a READ memory access.
==25813==Hint: address points to the zero page.
    #0 0x10812a44d in ivas_spar_to_dirac ivas_spar_md_dec.c:2542
    #1 0x108120999 in ivas_spar_md_dec_process ivas_spar_md_dec.c:764
    #2 0x108106f63 in ivas_spar_dec_MD ivas_spar_decoder.c:791
    #3 0x108105bd5 in ivas_spar_dec ivas_spar_decoder.c:376
    #4 0x107f1e7d2 in ivas_dec ivas_dec.c:411
    #5 0x1082366a9 in _GetSamples lib_dec.c:851
    #6 0x10823445b in IVAS_DEC_GetSamples lib_dec.c:965
    #7 0x107ce7d8c in decodeG192 decoder.c:2393
    #8 0x107cd9f10 in main decoder.c:847
    #9 0x10ae9652d in start+0x1cd (dyld:x86_64+0x552d)

==25813==Register values:
rax = 0x0000000000000090  rbx = 0x00007ff7b8214320  rcx = 0x00007ff7b821fffc  rdx = 0x0000000000000090  
rdi = 0x0000100000000000  rsi = 0x0000100000000012  rbp = 0x00007ff7b8214f30  rsp = 0x00007ff7b8213ce0  
 r8 = 0x0000100000000000   r9 = 0x00007ff7b8213f00  r10 = 0x00007ff7b8214020  r11 = 0x00007ff7b8214070  
r12 = 0x00007ff7b8214300  r13 = 0x00001ffef704279c  r14 = 0x00007ff7b82140c0  r15 = 0x00007ff7b82142e0  
AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV ivas_spar_md_dec.c:2542 in ivas_spar_to_dirac

Also happens for WB and SWB.

Edited by Jan Kiene