FS#11533 - Failing malloc in vorbis crashes clipv1
Opened by Bertrik Sikken (bertrik) - Wednesday, 11 August 2010, 19:05 GMT
Last edited by Bertrik Sikken (bertrik) - Monday, 23 August 2010, 20:11 GMT
When playing back certain ogg vorbis files in a sequence on the clip v1, the player crashes (with a data abort). This was observed for q=-1 48 kbps ogg vorbis files.
The failing malloc is in apps/codecs/libtremor/block.c line 168 where it tries to allocate an internal PCM buffer from IRAM (using a naive free-less allocator) of 32 kB. This allocation fails, so the buffer is allocated from regular RAM (using the TLSF allocator) instead. This buffer is never freed so eventually after playing a few of these ogg vorbis files, the TLSF pool is exhausted. This causes the player to crash with a data abort.
The vorbis codec_main function does not reinitialise the TLSF pool when playing ogg vorbis files in sequence.
There seems to be a setjmp/longjmp framework already in place to handle allocation failures, but apparently this isn't working (anymore).
Monday, 23 August 2010, 20:11 GMT
Reason for closing: Accepted
Additional comments about closing: oggmalloc.diff committed as SVN r27866.