This is the mail archive of the glibc-bugs@sources.redhat.com 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 nptl/415] pthread_cancel does not unwind stack when thread is cancelled inside signal handler


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


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