From nobody@FreeBSD.org  Tue Dec 25 21:35:06 2001
Return-Path: <nobody@FreeBSD.org>
Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21])
	by hub.freebsd.org (Postfix) with ESMTP id 80B6A37B419
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 25 Dec 2001 21:35:05 -0800 (PST)
Received: (from nobody@localhost)
	by freefall.freebsd.org (8.11.6/8.11.6) id fBQ5Z5o82241;
	Tue, 25 Dec 2001 21:35:05 -0800 (PST)
	(envelope-from nobody)
Message-Id: <200112260535.fBQ5Z5o82241@freefall.freebsd.org>
Date: Tue, 25 Dec 2001 21:35:05 -0800 (PST)
From: Kip Macy <kip_macy@yahoo.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: gdb seg faults when given handle SIGALRM nopass for threaded app
X-Send-Pr-Version: www-1.0

>Number:         33182
>Category:       bin
>Synopsis:       gdb(1) seg faults when given handle SIGALRM nopass for threaded app
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Dec 25 21:40:01 PST 2001
>Closed-Date:    
>Last-Modified:  Mon Feb 21 18:50:44 UTC 2011
>Originator:     Kip Macy
>Release:        4.4
>Organization:
Extended Solutions
>Environment:
FreeBSD netherworld.eventdriven.org 4.4-STABLE FreeBSD 4.4-STABLE #0: Sat Nov  3 20:42:16 PST 2001     root@netherworld.eventdriven.org:/usr/src/sys/compile/NETHERWORLD  i386

>Description:
      GNU gdb 4.18
Copyright 1998 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-unknown-freebsd"...
(gdb) b main
Breakpoint 1 at 0x804864a: file alrmtest.c, line 55.
(gdb) r
Starting program: /usr/home/kmacy/netapp/dvlp/alrmtest 

Breakpoint 1, main () at alrmtest.c:55
55              sk_init_timer();
(gdb) list
50      }
51
52      int 
53      main() {
54              int i, j;
55              sk_init_timer();
56              while (1) {
57                      /*  useless assignment to demonstrate lack of progress */
58                      i = 0;
59                      /*  useless assignment to demonstrate lack of progress */
(gdb) n
56              while (1) {
(gdb) n

Program received signal SIGTRAP, Trace/breakpoint trap.
0x280f1150 in _thread_sys_sigprocmask () from /usr/lib/libc_r.so.4
(gdb) n
Single stepping until exit from function _thread_sys_sigprocmask, 
which has no line number information.

Program received signal SIGTRAP, Trace/breakpoint trap.
0x280f1150 in _thread_sys_sigprocmask () from /usr/lib/libc_r.so.4
(gdb) handle SIGALRM nopass
Segmentation fault (core dumped)

>How-To-Repeat:
link app with libc_r
type handle SIGALRM nopass in gdb
>Fix:
      
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->mp 
Responsible-Changed-By: sheldonh 
Responsible-Changed-When: Wed Jan 30 05:05:41 PST 2002 
Responsible-Changed-Why:  
Over to maintainer. 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=33182 

From: Kip Macy <kip@eventdriven.org>
To: freebsd-gnats-submit@FreeBSD.org, kip_macy@yahoo.com
Cc:  
Subject: Re: gnu/33182: gdb seg faults when given handle SIGALRM nopass for 
 threaded app
Date: Sat, 09 Feb 2002 15:54:33 -0800

 I've already fixed this in the gdb51 port. I hope we can migrate to it
 soon.
 

From: Kip Macy <kmacy@netapp.com>
To: freebsd-gnats-submit@FreeBSD.org
Cc: mp@FreeBSD.org
Subject: Re: gnu/33182: gdb seg faults when given handle SIGALRM nopass for
 threaded app
Date: Sat, 9 Feb 2002 16:52:40 -0800 (PST)

 child_ops and procfs_ops don't implement to_notice_signals. If you look more
 closely you'll notice that this is not needed.
 
 diff /usr/src/gnu/usr.bin/binutils/gdb/freebsd-uthread.c.bak
 /usr/src/gnu/usr.bin/binutils/gdb/freebsd-uthread.c
 1116c1116
 <   freebsd_uthread_ops.to_notice_signals = freebsd_uthread_notice_signals;
 ---
 >   freebsd_uthread_ops.to_notice_signals = 0;
 
 
Responsible-Changed-From-To: mp->marcel 
Responsible-Changed-By: marcel 
Responsible-Changed-When: Sat Jul 17 01:51:30 GMT 2004 
Responsible-Changed-Why:  
Yet another PR that describes a gdb 4 bug. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=33182 
Responsible-Changed-From-To: marcel->freebsd-bugs 
Responsible-Changed-By: marcel 
Responsible-Changed-When: Mon Feb 21 18:50:24 UTC 2011 
Responsible-Changed-Why:  
Assign back to the pool. I haven't been working on it and it's unlikely 
I will in the near future.  

http://www.freebsd.org/cgi/query-pr.cgi?pr=33182 
>Unformatted:
