[x265] ASM crash in r6706

Jason Garrett-Glaser jason at x264.com
Wed Apr 16 19:28:45 CEST 2014


> x264 manually aligns their stack (see x264_stack_align())

Note that this is because we don't require gcc's
force_arg_align_stack_pointer intrinsic (added in 4.2). The stack
isn't guaranteed to be aligned on thread entry or library entry on
x86_32, so even if gcc is told to keep stack alignment, it can only
keep stack alignment relative to the entry point, hence we have to
manually align the entry point.

Note that this is important even if you don't use x264asm, because
using alignment intrinsics on stack-allocated arrays does not work if
the entry point hasn't been aligned.

x264asm's stack alignment /should/ align relative to the values being
pushed onto the stack -- if it isn't, something's probably very wrong.
I'm going to assume it's not broken, since it's used for a good bit of
ffmpeg and x264 code, but if it is broken, poke the x264 mailing list
with assembly code and the (wrong) assembled output.

Jason


More information about the x265-devel mailing list