This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] mips: Fix store/load gp registers to/from ucontext_t


On Thu, 18 May 2017, Maciej W. Rozycki wrote:

>  Not according to SUSv2 [1] AFAICT:
> 
> "The setcontext() function restores the user context pointed to by ucp.  
> A successful call to setcontext() does not return; program execution 
> resumes at the point specified by the ucp argument passed to setcontext().  
> The ucp argument should be created either by a prior call to getcontext() 
> or makecontext(), or by being passed as an argument to a signal handler."
> 
> -- notice the last statement.

Note that it says what the semantics are "If the ucp argument was created 
with getcontext()" and "If the ucp argument was created with 
makecontext()".  It does *not* say what the semantics are if it came from 
a signal handler; they are unspecified.  That is, SUSv2 deliberately 
removed the (presumably problematic) specification from XPG4.2 about the 
results "If the ucp argument was passed to a signal handler".

-- 
Joseph S. Myers
joseph@codesourcery.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]