[vlc-devel] commit: contrib: turn off Thumb ISA for libavcodec and libmad ( Rémi Denis-Courmont )

Måns Rullgård mans at mansr.com
Tue Sep 1 22:40:23 CEST 2009

"Rémi Denis-Courmont" <remi at remlab.net> writes:

> Le mardi 1 septembre 2009 22:23:08 Måns Rullgård, vous avez écrit :
>> You're probably hitting Cortex-A8 erratum 657417, which can cause
>> random crashes in Thumb mode.  It can be worked around by the
>> compiler/linker, though I don't remember whether any gcc version has
>> this capability.  CodeSourcery 2007q3 certainly doesn't, since this
>> bug was discovered in early 2009.  Recent releases of ARM RVCT do have
>> the workaround.
> Might well be.
>> You can check if this is the problem by forcing single-issue.  You
>> will need to mess with u-boot to do this though.  Let me know if you
>> want help with that.
> FYI, N900 uses NOLO ("Nokia Loader") as do all previous Nokia Nxxx Internet 
> tablets, not uboot.

Oh, you're doing this on N900 (wherever you got one of those).

>> > * FFMPEG triggers a segmentation fault when NEON FPU is enabled.
>> > -> FFMPEG with "default" FPU and VLC with NEON FPU works
>> >    (but surely not so fast).
>> > This smells a lot like a bug in avcodec (or gcc).
>> FFmpeg is thoroughly tested on Cortex-A8 with multiple compiler
>> versions.  Can you explain more in detail what you did when it failed?
> I just started decoding MPEG4 Part 2 (in MKV with AAC) or Part 10
> (in AVI with MP3). Disabling video decoding worked around it. VLC
> did not use FFMPEG for MKV, AVI, AAC nor MP3. It fails immediately,
> as far as I can tell.

Compiler flags as below?  Can you get a core dump?  Where does it crash?
Can you decode the file with a standalone FFmpeg build?

>> > This is all built with CodeSourcery 2007q3 ARMv7 toolchain (GCC 4.2.1).
>> Did you force any non-default compiler flags?
> I used -mtune=cortex-a8 -mcpu=cortex-a8 -march=arvm7-a -mfpu=neon -ftree-
> vectorize . The crash vanishes when removing -mfpu=neon. I also got the same 
> results without vectorization.

Do not ever, under any circumstance, use -ftree-vectorize.  We
explicitly use -fno-tree-vectorize for a reason.  Most gcc versions
WILL produce CRASHING code with -ftree-vectorize -mfpu=neon.

Måns Rullgård
mans at mansr.com

More information about the vlc-devel mailing list