This is the mail archive of the
glibc-bugs@sources.redhat.com
mailing list for the glibc project.
[Bug nptl/415] pthread_cancel does not unwind stack when thread is cancelled inside signal handler
- From: "yufeng_xiong at ltx dot com" <sourceware-bugzilla at sources dot redhat dot com>
- To: glibc-bugs at sources dot redhat dot com
- Date: 4 Oct 2004 13:42:10 -0000
- Subject: [Bug nptl/415] pthread_cancel does not unwind stack when thread is cancelled inside signal handler
- References: <20040929190407.415.yufeng_xiong@ltx.com>
- Reply-to: sourceware-bugzilla at sources dot redhat dot com
------- Additional Comments From yufeng_xiong at ltx dot com 2004-10-04 13:42 -------
Deal Ulrich,
Here is more test results regarding pthread_cancel and pthread_exit cause thread
stack unwind (thread local objects be destructed) behavior on Linux:
1. With the default deferred cancellation: In thread normal execution, it works.
If the thread is inside it's signal handler and get cancelled, it does not work.
2. If use asyncrhonous cancellation: both cases (thread get cancelled while in
it's normal execution or inside it's signal handler) don't work.
3. If use pthread_exit, both cases (call pthread_exit from it's normal execution
or from it's signal handler) works, and this is independent of the cancellation
type.
So clearly there are some mismatch in the behaviors, I would expect
pthread_cancel and pthread_exit should have the same behavior (just as far as
thread stack unwind behavior is concerned), and this behavior also should not
depend on the cancellation type with pthread_cancel.
Thanks very much.
Yufeng
--
http://sources.redhat.com/bugzilla/show_bug.cgi?id=415
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.