Re: misc/177624: Swapcontext can get compiled incorrectly

2013-04-04 Thread Brian Demsky
The following reply was made to PR misc/177624; it has been noted by GNATS. From: Brian Demsky To: Bruce Evans Cc: freebsd-bugs@freebsd.org, freebsd-gnats-sub...@freebsd.org Subject: Re: misc/177624: Swapcontext can get compiled incorrectly Date: Thu, 4 Apr 2013 09:43:06 -0700 On Apr 4, 2013

Re: misc/177624: Swapcontext can get compiled incorrectly

2013-04-04 Thread Brian Demsky
On Apr 4, 2013, at 8:16 AM, Bruce Evans wrote: > On Fri, 5 Apr 2013, Bruce Evans wrote: > >> On Thu, 4 Apr 2013, Brian Demsky wrote: >> >>>> Description: >>> Here is the code for swap context: >>> int >>> swapcontext(ucontext_t *oucp,

Re: misc/177624: Swapcontext can get compiled incorrectly

2013-04-03 Thread Brian Demsky
> The analysis is a little wrong about the problem. Ultimately, the tail call > to set context trashes the copies of bx and r14 on the stackā€¦. On Apr 3, 2013, at 10:03 PM, Eitan Adler wrote: > On 3 April 2013 23:10, Brian Demsky wrote: >> The following reply was made to PR misc

Re: misc/177624: Swapcontext can get compiled incorrectly

2013-04-03 Thread Brian Demsky
The following reply was made to PR misc/177624; it has been noted by GNATS. From: Brian Demsky To: bug-follo...@freebsd.org Cc: Subject: Re: misc/177624: Swapcontext can get compiled incorrectly Date: Wed, 03 Apr 2013 20:01:14 -0700

misc/177624: Swapcontext can get compiled incorrectly

2013-04-03 Thread Brian Demsky
>Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu Apr 04 02:40:00 UTC 2013 >Closed-Date: >Last-Modified: >Originator: Brian Demsky >Release:OS X distribution of libc >Organization: UCI >Environment: >Description:

Bug in swapcontext method

2013-04-03 Thread Brian Demsky
Here is the code for swap context: int swapcontext(ucontext_t *oucp, const ucontext_t *ucp) { int ret; if ((oucp == NULL) || (ucp == NULL)) { errno = EINVAL; return (-1); } oucp->uc_flags &= ~UCF_SWAPPED; ret = getcontext(ouc