From owner-freebsd-threads@FreeBSD.ORG Sun Jun 3 19:28:43 2007 Return-Path: X-Original-To: freebsd-threads@FreeBSD.org Delivered-To: freebsd-threads@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 38DD416A468 for ; Sun, 3 Jun 2007 19:28:43 +0000 (UTC) (envelope-from jylefort@FreeBSD.org) Received: from host-212-68-244-81.brutele.be (host-212-68-244-81.brutele.be [212.68.244.81]) by mx1.freebsd.org (Postfix) with ESMTP id 808CE13C46C for ; Sun, 3 Jun 2007 19:28:42 +0000 (UTC) (envelope-from jylefort@FreeBSD.org) Received: from jsite.lefort.net (jsite.lefort.net [192.168.1.2]) by gateway.lefort.net (Postfix) with ESMTP id 32F0454FB for ; Sun, 3 Jun 2007 21:09:39 +0200 (CEST) Received: from jsite.lefort.net (localhost [127.0.0.1]) by jsite.lefort.net (Postfix) with SMTP id EAD4B2D for ; Sun, 3 Jun 2007 21:09:38 +0200 (CEST) Date: Sun, 3 Jun 2007 21:09:30 +0200 From: Jean-Yves Lefort To: freebsd-threads@FreeBSD.org Message-Id: <20070603210930.8fae0082.jylefort@FreeBSD.org> X-Mailer: Sylpheed running on FreeBSD Mime-Version: 1.0 Content-Type: multipart/signed; protocol="application/pgp-signature"; micalg="PGP-SHA1"; boundary="Signature=_Sun__3_Jun_2007_21_09_31_+0200_fShs=DO27a0.A+ir" X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: Subject: broken signal handling X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Jun 2007 19:28:43 -0000 --Signature=_Sun__3_Jun_2007_21_09_31_+0200_fShs=DO27a0.A+ir Content-Type: multipart/mixed; boundary="Multipart=_Sun__3_Jun_2007_21_09_30_+0200_G=2o4AZVwFiBbXiw" --Multipart=_Sun__3_Jun_2007_21_09_30_+0200_G=2o4AZVwFiBbXiw Content-Type: text/plain; charset=US-ASCII Content-Disposition: inline Content-Transfer-Encoding: 7bit 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/ --Multipart=_Sun__3_Jun_2007_21_09_30_+0200_G=2o4AZVwFiBbXiw-- --Signature=_Sun__3_Jun_2007_21_09_31_+0200_fShs=DO27a0.A+ir Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (FreeBSD) iD8DBQFGYxHyyzD7UaO4AGoRAlqPAJ4mm1NKxPzHBSqDv6By4bn81lr0QgCbBoNl aXwCqsSd/dHOZMPMCrmjvPw= =IHlS -----END PGP SIGNATURE----- --Signature=_Sun__3_Jun_2007_21_09_31_+0200_fShs=DO27a0.A+ir--