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 nptl/2748] Cancel from printf not calling the cancel handler


------- Additional Comments From jakub at redhat dot com  2007-03-28 17:17 -------
The problem is that many functions don't have .eh_frame unwind info generated.
There are 2 ways how to solve this, one is to build the whole libc with
-fasynchronous-unwind-tables (that's e.g. what Fedora 7 is doing and what e.g.
x86_64 or s390{,x} do by default), or write a patch similar to the one I'll
attach (but while this patch handles just stuff found in the backtrace where this
was cancelled, the real patch would need to investigate what are all callers of
cancellable functions and make sure they are all not __THROW and built with
either -fexceptions of -fasynchronous-unwind-tables.
The important difference between the two is that with -fexceptions you don't get
any unwind info if e.g. all callees are __THROW, with the latter you get it
anyway.
FYI, the testcase is buggy, passing address of an automatic variable as last
pthread_create argument and dereferencing it in the thread body has undefined
behavior.

-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=2748

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