[Ffmpeg-devel] sse sigsegv and libavcodec/wmadec.c
Zuxy Meng
zuxy.meng
Thu Dec 7 08:03:15 CET 2006
Hi,
2006/12/7, Rich Felker <dalias at aerifal.cx>:
> It's actually a gcc bug and it affects all systems except ones which
> implement nonstandard GNU abi semantics, i.e. glibc. The problem is
> that gcc makes no effort to actually align the stack but assumes that
> it's aligned to begin with and that all function calls will keep it
> aligned. This requires both the libc startup code (crt0.o or whatever)
> to align the stack, and for all code to be compiled with a compiler
> that wastes stack space and instructions to keep the stack aligned.
>
> The only correct implementation is for the compiler to make no
> assumption about stack alignment (beyond the mandatory word alignment
> that's existed in the i386 abi ever since the beginning) and always
> align the stack itself in the case where there are automatic variables
> needing more stringent alignment than the default. Anything else will
> break when linked with code from different compilers, startup code
> from non-glibc-compliant systems, asm, etc.
>
> If gcc devs refuse to fix their broken shit, I only see two possible
> solutions:
They appear to have fix it in the (upcoming) 4.2 with
force_align_arg_pointer attribute.
> 1. disable sse
> 2. work around it by writing our own crap to align it...
--
Zuxy
Beauty is truth,
While truth is beauty.
PGP KeyID: E8555ED6
More information about the ffmpeg-devel
mailing list