[patch i386]: For target x86_64-pc-mingw32 _alloca and _stkchk may corrupts stack alignment
Kai Tietz
Kai.Tietz@onevision.com
Mon Jan 28 19:49:00 GMT 2008
Hi,
This patch fixes two problems for the target x86_64-pc-mingw32 in _alloca
and a possible problem in _stkchk. The stack alignment on 64-bit Windows
needs to be on 8 bytes. Otherwise a general exception will be raised. This
can certain happen for _alloca and may for _chkstk. The other problem is
that _alloca implementation for _WIN64 does not take care about the
parameter stack reservation of abi. This leads to a wrong stack pointer.
ChangeLog:
2008-01-28 Kai Tietz <kai.tietz@onevision.com>
* gcc/config/i386/cygwin.asm: (__alloca): Correct calling
convention and alignment.
(__chkstk): Force 8 byte stack alignment.
Is this fix OK for apply on mainline?
Regards,
i.A. Kai Tietz
| (\_/) This is Bunny. Copy and paste Bunny
| (='.'=) into your signature to help him gain
| (")_(") world domination.
------------------------------------------------------------------------------------------
OneVision Software Entwicklungs GmbH & Co. KG
Dr.-Leo-Ritter-Straße 9 - 93049 Regensburg
Tel: +49.(0)941.78004.0 - Fax: +49.(0)941.78004.489 - www.OneVision.com
Commerzbank Regensburg - BLZ 750 400 62 - Konto 6011050
Handelsregister: HRA 6744, Amtsgericht Regensburg
Komplementärin: OneVision Software Entwicklungs Verwaltungs GmbH
Dr.-Leo-Ritter-Straße 9 – 93049 Regensburg
Handelsregister: HRB 8932, Amtsgericht Regensburg - Geschäftsführer:
Ulrike Döhler, Manuela Kluger
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: mingw_w64_alloca.txt
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20080128/17be87a8/attachment.txt>
More information about the Gcc-patches
mailing list