public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug nptl/400] New: "return V;" and "pthread_exit(V) ;" don't behave the same way.
@ 2004-09-23  8:20 sebastien dot decugis at ext dot bull dot net
  2004-09-23  8:22 ` [Bug nptl/400] " sebastien dot decugis at ext dot bull dot net
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: sebastien dot decugis at ext dot bull dot net @ 2004-09-23  8:20 UTC (permalink / raw)
  To: glibc-bugs

As POSIX standard requires "return V;" in a thread make an implicit call to
"pthread_exit(V);" -- see pthread_exit() reference --, the behavior is
different. For example, pthread_exit() will call the cancelation cleanup
handlers which are pending (this is required by POSIX) whereas return won't.

-- 
           Summary: "return V;" and "pthread_exit(V) ;" don't behave the
                    same way.
           Product: glibc
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: nptl
        AssignedTo: drepper at redhat dot com
        ReportedBy: sebastien dot decugis at ext dot bull dot net
                CC: glibc-bugs at sources dot redhat dot com


http://sources.redhat.com/bugzilla/show_bug.cgi?id=400

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug nptl/400] "return V;" and "pthread_exit(V) ;" don't behave the same way.
  2004-09-23  8:20 [Bug nptl/400] New: "return V;" and "pthread_exit(V) ;" don't behave the same way sebastien dot decugis at ext dot bull dot net
@ 2004-09-23  8:22 ` sebastien dot decugis at ext dot bull dot net
  2004-09-23  8:32 ` jakub at redhat dot com
  2004-09-23  8:38 ` sebastien dot decugis at ext dot bull dot net
  2 siblings, 0 replies; 4+ messages in thread
From: sebastien dot decugis at ext dot bull dot net @ 2004-09-23  8:22 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From sebastien dot decugis at ext dot bull dot net  2004-09-23 08:22 -------
Created an attachment (id=198)
 --> (http://sources.redhat.com/bugzilla/attachment.cgi?id=198&action=view)
This file shows shortly the problem

The file is quite self-explanatory.

-- 


http://sources.redhat.com/bugzilla/show_bug.cgi?id=400

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug nptl/400] "return V;" and "pthread_exit(V) ;" don't behave the same way.
  2004-09-23  8:20 [Bug nptl/400] New: "return V;" and "pthread_exit(V) ;" don't behave the same way sebastien dot decugis at ext dot bull dot net
  2004-09-23  8:22 ` [Bug nptl/400] " sebastien dot decugis at ext dot bull dot net
@ 2004-09-23  8:32 ` jakub at redhat dot com
  2004-09-23  8:38 ` sebastien dot decugis at ext dot bull dot net
  2 siblings, 0 replies; 4+ messages in thread
From: jakub at redhat dot com @ 2004-09-23  8:32 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From jakub at redhat dot com  2004-09-23 08:32 -------
Your testcase invokes undefined behaviour.
See 
http://www.opengroup.org/onlinepubs/009695399/functions/pthread_cleanup_pop.html
The effect of the use of return, break, continue, and goto to prematurely leave a
code block described by a pair of pthread_cleanup_push() and
pthread_cleanup_pop() functions calls is undefined.


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


http://sources.redhat.com/bugzilla/show_bug.cgi?id=400

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug nptl/400] "return V;" and "pthread_exit(V) ;" don't behave the same way.
  2004-09-23  8:20 [Bug nptl/400] New: "return V;" and "pthread_exit(V) ;" don't behave the same way sebastien dot decugis at ext dot bull dot net
  2004-09-23  8:22 ` [Bug nptl/400] " sebastien dot decugis at ext dot bull dot net
  2004-09-23  8:32 ` jakub at redhat dot com
@ 2004-09-23  8:38 ` sebastien dot decugis at ext dot bull dot net
  2 siblings, 0 replies; 4+ messages in thread
From: sebastien dot decugis at ext dot bull dot net @ 2004-09-23  8:38 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From sebastien dot decugis at ext dot bull dot net  2004-09-23 08:38 -------
Oops yes sorry!!


-- 


http://sources.redhat.com/bugzilla/show_bug.cgi?id=400

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2004-09-23  8:38 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-09-23  8:20 [Bug nptl/400] New: "return V;" and "pthread_exit(V) ;" don't behave the same way sebastien dot decugis at ext dot bull dot net
2004-09-23  8:22 ` [Bug nptl/400] " sebastien dot decugis at ext dot bull dot net
2004-09-23  8:32 ` jakub at redhat dot com
2004-09-23  8:38 ` sebastien dot decugis at ext dot bull dot net

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).