public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libc/18125] New: aarch64: arm: nios2: hppa: setcontext incorrectly calls _exit after last linked context.
@ 2015-03-13 21:00 carlos at redhat dot com
2015-05-08 15:30 ` [Bug libc/18125] " cvs-commit at gcc dot gnu.org
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: carlos at redhat dot com @ 2015-03-13 21:00 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=18125
Bug ID: 18125
Summary: aarch64: arm: nios2: hppa: setcontext incorrectly
calls _exit after last linked context.
Product: glibc
Version: 2.21
Status: NEW
Severity: normal
Priority: P2
Component: libc
Assignee: unassigned at sourceware dot org
Reporter: carlos at redhat dot com
CC: drepper.fsp at gmail dot com
There appears to be a discrepancy amongst the port implementations
of setcontext with regards to the function called once the last
linked-to context has finished executing.
The POSIX standard says:
~~~
If the uc_link member of the ucontext_t structure pointed to by
the ucp argument is equal to 0, then this context is the main
context, and the thread will exit when this context returns.
~~~
It says "exit" not "exit immediately" or "exit without running
functions registered with atexit or on_exit."
Therefore the AArch64, ARM, hppa and NIOS II implementations are
wrong and no test detects it.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug libc/18125] aarch64: arm: nios2: hppa: setcontext incorrectly calls _exit after last linked context.
2015-03-13 21:00 [Bug libc/18125] New: aarch64: arm: nios2: hppa: setcontext incorrectly calls _exit after last linked context carlos at redhat dot com
@ 2015-05-08 15:30 ` cvs-commit at gcc dot gnu.org
2015-05-08 15:31 ` carlos at redhat dot com
2015-05-08 15:32 ` carlos at redhat dot com
2 siblings, 0 replies; 4+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2015-05-08 15:30 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=18125
--- Comment #1 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".
The branch, master has been updated
via c92d40c0bcfdeec96848d1e67902e621942144e9 (commit)
from a6d78c3b9dc9bf598a60be18e23bf8fe7668a088 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=c92d40c0bcfdeec96848d1e67902e621942144e9
commit c92d40c0bcfdeec96848d1e67902e621942144e9
Author: Carlos O'Donell <carlos@systemhalted.org>
Date: Fri May 8 11:20:32 2015 -0400
Bug 18125: Call exit after last linked context.
There appears to be a discrepancy among the implementations
of setcontext with regards to the function called once the last
linked-to context has finished executing via setcontext.
The POSIX standard says:
~~~
If the uc_link member of the ucontext_t structure pointed to by
the ucp argument is equal to 0, then this context is the main
context, and the thread will exit when this context returns.
~~~
It says "exit" not "exit immediately" nor "exit without running
functions registered with atexit or on_exit."
Therefore the AArch64, ARM, hppa and NIOS II implementations are
wrong and no test detects it.
It is questionable if this should even be fixed or just documented
that the above 4 targets are wrong. The functions are deprecated
and nobody should be using them, but at the same time it silly to
have cross-target differences that make it hard to port old
applications from say x86_64 to AArch64.
Therefore I will ix the 4 arches, and checkin a regression
test to prevent it from changing again.
https://sourceware.org/ml/libc-alpha/2015-03/msg00720.html
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 13 +++
NEWS | 18 ++--
stdlib/Makefile | 9 ++-
stdlib/tst-setcontext3.c | 138 ++++++++++++++++++++++++++
stdlib/tst-setcontext3.sh | 54 ++++++++++
sysdeps/unix/sysv/linux/aarch64/setcontext.S | 2 +-
sysdeps/unix/sysv/linux/arm/setcontext.S | 2 +-
sysdeps/unix/sysv/linux/hppa/setcontext.S | 3 +-
sysdeps/unix/sysv/linux/nios2/setcontext.S | 6 +-
9 files changed, 229 insertions(+), 16 deletions(-)
create mode 100644 stdlib/tst-setcontext3.c
create mode 100644 stdlib/tst-setcontext3.sh
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug libc/18125] aarch64: arm: nios2: hppa: setcontext incorrectly calls _exit after last linked context.
2015-03-13 21:00 [Bug libc/18125] New: aarch64: arm: nios2: hppa: setcontext incorrectly calls _exit after last linked context carlos at redhat dot com
2015-05-08 15:30 ` [Bug libc/18125] " cvs-commit at gcc dot gnu.org
@ 2015-05-08 15:31 ` carlos at redhat dot com
2015-05-08 15:32 ` carlos at redhat dot com
2 siblings, 0 replies; 4+ messages in thread
From: carlos at redhat dot com @ 2015-05-08 15:31 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=18125
Carlos O'Donell <carlos at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
--- Comment #2 from Carlos O'Donell <carlos at redhat dot com> ---
Fixed on master. Will be in 2.22.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug libc/18125] aarch64: arm: nios2: hppa: setcontext incorrectly calls _exit after last linked context.
2015-03-13 21:00 [Bug libc/18125] New: aarch64: arm: nios2: hppa: setcontext incorrectly calls _exit after last linked context carlos at redhat dot com
2015-05-08 15:30 ` [Bug libc/18125] " cvs-commit at gcc dot gnu.org
2015-05-08 15:31 ` carlos at redhat dot com
@ 2015-05-08 15:32 ` carlos at redhat dot com
2 siblings, 0 replies; 4+ messages in thread
From: carlos at redhat dot com @ 2015-05-08 15:32 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=18125
Carlos O'Donell <carlos at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |2.22
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-05-08 15:32 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-13 21:00 [Bug libc/18125] New: aarch64: arm: nios2: hppa: setcontext incorrectly calls _exit after last linked context carlos at redhat dot com
2015-05-08 15:30 ` [Bug libc/18125] " cvs-commit at gcc dot gnu.org
2015-05-08 15:31 ` carlos at redhat dot com
2015-05-08 15:32 ` carlos at redhat dot com
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).