bin/31661: pthread_kill signal handler doesn't get sigcontext or ucontext

Craig Rodrigues rodrigc at crodrigues.org
Mon Feb 2 13:40:21 PST 2004


The following reply was made to PR bin/31661; it has been noted by GNATS.

From: Craig Rodrigues <rodrigc at crodrigues.org>
To: freebsd-gnats-submit at FreeBSD.org
Cc: nb at ravenbrook.com, mps-staff at ravenbrook.com
Subject: Re: bin/31661: pthread_kill signal handler doesn't get sigcontext or ucontext
Date: Mon, 2 Feb 2004 16:39:30 -0500

 Hi,
 
 I just tried your test program on FreeBSD-CURRENT.
 
 When linked with -lc_r, the output is:
 
 NSI Thread  0x0804c400
 BSD Thread   0x0804cc00
 Posix Thread 0x0805f000
 waiting for the threads to be alive
 ANSI is alive: 0x0804c400
 BSD is alive: 0x0804cc00
 Posix is alive: 0x0805f000
 waiting for the signals to be delivered
 ANSI:  Handled 1 signal 30 pthread 0x0804c400
 BSD:   Handled 1 signal 31 pthread 0x0804cc00 code 0 sigcontext 0x00000000
 Posix: Handled 1 signal 25 pthread 0x0805f000 info 0x00000000 context 0x00000000
 
 
 
 When linked with -lpthread, the output is:
 
 ANSI Thread  0x08053400
 BSD Thread   0x08053600
 Posix Thread 0x08053800
 waiting for the threads to be alive
 ANSI is alive: 0x08053400
 BSD is alive: 0x08053600
 Posix is alive: 0x08053800
 waiting for the signals to be delivered
 ANSI:  Handled 1 signal 30 pthread 0x08053400
 BSD:   Handled 1 signal 31 pthread 0x08053600 code 0 sigcontext 0xbfaddbe8
 Posix: Handled 1 signal 25 pthread 0x08053800 info 0xbfacdb58 context 0xbfacdbe8
 
 
 You mentioned that the bug is demonstrated by the fact
 that sigcontext and context are 0 in the last two lines of the output.
 
 This problem does not seem to exist for the new pthread library.
 
 -- 
 Craig Rodrigues        
 rodrigc at crodrigues.org


More information about the freebsd-threads mailing list