[FFmpeg-devel] [PATCH] fix h264_deblock_sse2.asm segfaults on clang/x86-32

Alexander Strange astrange
Wed Sep 1 08:35:04 CEST 2010


On Sep 1, 2010, at 2:23 AM, Reimar D?ffinger wrote:

> On Wed, Sep 01, 2010 at 02:01:36AM -0400, Ronald S. Bultje wrote:
>> Hi,
>> 
>> On Wed, Sep 1, 2010 at 1:53 AM, Reimar D?ffinger
>> <Reimar.Doeffinger at gmx.de> wrote:
>>> On Tue, Aug 31, 2010 at 07:06:09PM -0400, Ronald S. Bultje wrote:
>>>> on fate/clang/freebsd/x86-32 [1], all h264 tests fail with a sigbus.
>>>> There's some alignment issues in the sse2 asm. The asm appears to
>>>> assume that the caller function guarantees a certain alignment, which
>>>> is (IMO) not necessarily true. If the function is called directly from
>>>> C, stack can have any alignment, depending on the compiler used, so
>>>> the functions shouldn't assume any specific alignment imo.
>>> 
>>> We already use
>>> attribute_align_arg
>> 
>> Alex brought that up also. That sets alignment of stack in functions,
>> not functions called by functions (afaics). Since these are compiled
>> by yasm, they're unaffected by that.
>> 
>> Or clang is buggy, who knows... :-).
> 
> No it's not, I just considered it reasonable to assume that any
> non-ancient compiler wouldn't needlessly clobber stack alignment.

Adding "-mllvm -stack-alignment=16" to cflags might fix it.



More information about the ffmpeg-devel mailing list