This is the mail archive of the glibc-bugs@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]

[Bug libc/18080] [s390] setcontext/swapcontext does not restore signal mask


https://sourceware.org/bugzilla/show_bug.cgi?id=18080

Stefan Liebler <stli at linux dot vnet.ibm.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #2 from Stefan Liebler <stli at linux dot vnet.ibm.com> ---
Resolved with commit 2e807f29595eb5b1e5d0decc6e356a3562ecc58e.

There is no issue with the return value %r2 of swapcontext():
In getcontext(), %r2 is set to zero just before gprs %r0...%r15 are
stored in ucp. In setcontext(), %r2 is loaded with the stored zero just
before returning. In swapcontext(), %r2 is clobbered with sigprocmask
call, but is loaded with the zero stored in ucp just before returning.
In swapcontext(), %r2 needs to be set to zero before storing gprs in
old-ucp.
If you call setcontext() with the old-ucp retrieved with swapcontext,
then swapcontext() will return zero.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


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