[PATCH 3/3] Set mcontext.cr2 to the faulting address

Corinna Vinschen corinna-cygwin@cygwin.com
Thu Apr 9 14:54:00 GMT 2015


Hi Jon,


Just a formatting nit:

On Apr  9 14:13, Jon TURNEY wrote:
> 	* exceptions.cc (call_signal_handler): Set mcontext.cr2 to the
> 	faulting address.
> 
> Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
> ---
>  winsup/cygwin/ChangeLog     | 5 +++++
>  winsup/cygwin/exceptions.cc | 4 ++++
>  2 files changed, 9 insertions(+)
> 
> diff --git a/winsup/cygwin/exceptions.cc b/winsup/cygwin/exceptions.cc
> index 0223052..919122e 100644
> --- a/winsup/cygwin/exceptions.cc
> +++ b/winsup/cygwin/exceptions.cc
> @@ -1521,6 +1521,10 @@ _cygtls::call_signal_handler ()
>  
>            context.uc_sigmask = context.uc_mcontext.oldmask = this_oldmask;
>  
> +          context.uc_mcontext.cr2 = (thissi.si_signo == SIGSEGV
> +                                     || thissi.si_signo == SIGBUS)
> +            ? (uintptr_t) thissi.si_addr : 0;

Please use leading TABs with ts=8 throughout, and I'd prefer if the ?
in the above expression is right under the paren two lines above, like
this:

	  context.uc_mcontext.cr2 = (thissi.si_signo == SIGSEGV
				     || thissi.si_signo == SIGBUS)
				    ? (uintptr_t) thissi.si_addr : 0;

With these changes, all patches are ok to push.


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/20150409/8b0ffeb0/attachment.sig>


More information about the Cygwin-patches mailing list