[PATCH] Try to make sure struct _mcontext is 16-byte aligned

Corinna Vinschen corinna-cygwin@cygwin.com
Thu Apr 2 17:01:00 GMT 2015


On Apr  2 17:24, Jon TURNEY wrote:
> On x86_64, RtlCaptureContext() uses fxsave to save FPU/MMX/SSE state.
> 
> fxsave requires that the destination address is 16-byte aligned, or it will
> fault.
> 
> CONTEXT is already annotated __attribute__ ((aligned (16))), do the same with
> struct _mcontext.
> 
> Rearrange ucontext_t so that it's struct _mcontext element is also correctly
> aligned.
> 
> 	* include/cygwin/signal.h (struct __mcontext): 16-byte align.
> 	* include/sys/ucontext.h (ucontext_t): Ditto.

The __attribute__ should follow the "struct" keyword.  With this
change, ok to apply.


Thanks,
Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin-patches/attachments/20150402/b54a5990/attachment.sig>


More information about the Cygwin-patches mailing list