gdb  User: guest  Access: viewconf gnatsweb
MAIN PAGECREATEQUERYADV. QUERYLOGIN AGAINHELP

View Problem Report: 1377

or add note or send email to interested parties


Reporter's email: mec@shout.net
CC these people
on PR status email:
   
Number: 1377
Category: c++
Synopsis: [regression] g++ 2.95.3, dwarf-2, hand function call: SIGSEGV
Confidential: no
Severity: serious
Priority: medium
Responsible: chastain
State: closed
Class: sw-bug
Submitter-Id: net
Arrival-Date: Sun Sep 14 22:58:01 UTC 2003
Closed-Date: Fri Dec 05 05:00:18 UTC 2003
Last-Modified: Fri Dec 05 05:00:18 UTC 2003
Originator: mec@shout.net
Release: gdb HEAD 2003-09-13 14:00:00 UTC
Organization:
Environment: target=native, host=i686-pc-linux-gnu, osversion=red-hat-8.0
gdb=HEAD 2003-09-13 14:00:00 UTC
gcc=2.95.3
binutils=2.14
glibc=2.2.93-5-rh
gformat=dwarf-2
glevel=2
Description: gdb coughs up in virtfunc.exp:

(gdb) PASS: gdb.cp/virtfunc.exp: print pDd->vg()
print pEe->vvb()^M
^M
Program received signal SIGSEGV, Segmentation fault.^M
0x00000000 in ?? ()^M
The program being debugged was signaled while in a function called from GDB.^M
GDB remains in the frame where the signal was received.^M
To change this behavior use "set unwindonsignal on"^M
Evaluation of the expression containing the function (at 0x0) will be abandoned.
^M
(gdb) FAIL: gdb.cp/virtfunc.exp: print pEe->vvb()

gdb regressed some time between 2003-09-11 07:16:02 UTC and 2003-09-13 14:00:00 UTC.

My executable file is attached.

File Attachments:
download filename size
virtfunc 137k
How-To-Repeat: gdb namespace
(gdb) break test_calls
(gdb) run
(gdb) print pAe->f()
$2 = 20
(gdb) print pAa->f()
$3 = 1
(gdb) print pDe->vg()
$4 = 202
(gdb) print pADe->vg()
$5 = 202
(gdb) print pDd->vg()
$6 = 101
(gdb) print pEe->vvb()


Or, just run virtfunc.exp and look at these particular tests.
Fix:
Release-Note:
Unformatted:

or send email to interested parties

Audit Trail:

Responsible-Changed-From-To: unassigned->chastain
Responsible-Changed-By: chastain
Responsible-Changed-When: Thu Nov 27 07:01:01 2003
Responsible-Changed-Why:
    
    Mine.
State-Changed-From-To: open->analyzed
State-Changed-By: chastain
State-Changed-When: Thu Nov 27 07:01:01 2003
State-Changed-Why:
    
    This PR is caused by the same bug that causes PR gdb/1465.
    
    gnuv2_value_rtti_type calls lookup_typename and gets the evil namespace symbol and does bogus things with it.
    
    [top] print *rtti_type->main_type
    $10 = {code = TYPE_CODE_NAMESPACE, upper_bound_type = BOUND_SIMPLE,
      lower_bound_type = BOUND_SIMPLE, name = 0x82d738c "E",
      tag_name = 0x82d738c "E", objfile = 0x82cf190, target_type = 0x0, flags = 0,
      nfields = 0, vptr_fieldno = -1, fields = 0x0, vptr_basetype = 0x0,
      type_specific = {cplus_stuff = 0x82887e0, floatformat = 0x82887e0}}
    

From: chastain@sources.redhat.com
To: gdb-gnats@sourceware.org
Cc:  
Subject: c++/1377
Date: 5 Dec 2003 04:25:10 -0000

 CVSROOT:	/cvs/src
 Module name:	src
 Changes by:	chastain@sourceware.org	2003-12-05 04:25:09
 
 Modified files:
 	gdb            : ChangeLog cp-support.h cp-support.c 
 	                 gnu-v2-abi.c gnu-v3-abi.c 
 
 Log message:
 	2003-12-04  Michael Chastain  <mec.gnu@mindspring.com>
 	
 	Partial fix for PR c++/1465.
 	Fix for PR c++/1377.
 	* cp-support.h (cp_lookup_rtti_type): New function.
 	* cp-support.c (cp_lookup_rtti_type): New function.
 	* gnu-v2-abi.c: Update copyright years.
 	(gnuv2_rtti_type): Call cp_lookup_rtti_type.
 	* gnu-v3-abi.c: Update copyright years.
 	(gnuv3_rtti_type): Call cp_lookup_rtti_type.
 
 Patches:
 
        http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/gdb/ChangeLog.diff?cvsroot=src&r1=1.5084&r2=1.5085
 
        http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/gdb/cp-support.h.diff?cvsroot=src&r1=1.9&r2=1.10
 
        http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/gdb/cp-support.c.diff?cvsroot=src&r1=1.9&r2=1.10
 
        http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/gdb/gnu-v2-abi.c.diff?cvsroot=src&r1=1.13&r2=1.14
 
        http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/gdb/gnu-v3-abi.c.diff?cvsroot=src&r1=1.19&r2=1.20
 
State-Changed-From-To: analyzed->closed
State-Changed-By: chastain
State-Changed-When: Fri Dec  5 05:00:18 2003
State-Changed-Why:
    
    Fixed.