[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freebsd-threads
Subject:    broken signal handling
From:       Jean-Yves Lefort <jylefort () freebsd ! org>
Date:       2007-06-03 19:09:30
Message-ID: 20070603210930.8fae0082.jylefort () FreeBSD ! org
[Download RAW message or body]

[Attachment #2 (multipart/mixed)]


When a stack overflow occurs, signal handlers are not run (6.2):

libpthread:

	$ cc -pthread -o test test.c
	$ ./test
	Bus error: 10 (core dumped)
	$ ./test thread
	Segmentation fault: 11 (core dumped)

libthr:

	$ cc -lthr -o test test.c
	$ ./test
	signal 10 occurred
	$ ./test thread
	Illegal instruction: 4 (core dumped)

As you can see, the appropriate signal handler is only run with
libthr, provided the stack overflow occurs in the main thread.

I don't know what POSIX has to say on this, but it would nevertheless
be desirable to fix the problem. FYI, it works on Linux 2.6.9.

--
Jean-Yves Lefort

jylefort@FreeBSD.org
http://lefort.be.eu.org/

[Attachment #5 (application/pgp-signature)]

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic