[patch libffi]: Fix _ffi_call_win64 stack allocation
Anthony Green
green@redhat.com
Mon Sep 28 21:22:00 GMT 2009
Kai Tietz wrote:
> Hello,
>
> this patch fixes a stack allocation bug in _ffi_call_win64. The issue
> is that the stack was one time allocated by ___chkstk and then again
> stack was probed and allocated by a random value of %rax. Gcc's
> ___chkstk isn't the same as VC's. VC's version just probes the given
> size in %rax on stack, but doesn't allocate it, but gcc's version
> probes and allocates. Also VC's version doesn't clobber any register,
> but gcc's version clobbers rax, r10, and r11. For more details see
> gcc/config/i386/cygwin.asm file.
>
> ChangeLog
>
> 2009-09-28 Kai Tietz <kai.tietz@onevision.com>
>
> * src/x86/win64.S (_ffi_call_win64 stack): Remove for gnu
> assembly version use of ___chkstk.
>
> Tested for x86_64-pc-mingw32 without regressions. Ok for apply?
>
Yes, thanks.
AG
> Kai
>
>
More information about the Gcc-patches
mailing list