This is the mail archive of the gdb-prs@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: gdb/638: Seg fault in mk_cv_type of gdbtypes.c on Solaris


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

From: John Carter <john.carter@tait.co.nz>
To: Daniel Jacobowitz <drow@mvista.com>
Cc: john.carter@tait.co.nz, gdb-gnats@sources.redhat.com
Subject: Re: gdb/638: Seg fault in mk_cv_type of gdbtypes.c on Solaris
Date: Thu, 08 Aug 2002 17:59:23 +1200 (NZST)

 I can confirm this is fixed in the snapshot gdb+dejagnu-20020807.tar.bz2 
 snapshot. You can close that bug.
 
 Sorry  and thanks for the quick response.
 
 On Wed, 7 Aug 2002, Daniel Jacobowitz wrote:
 
 > On Thu, Aug 08, 2002 at 12:55:37AM -0000, john.carter@tait.co.nz wrote:
 > > 
 > > >Number:         638
 > > >Category:       gdb
 > > >Synopsis:       Seg fault in mk_cv_type of gdbtypes.c on Solaris
 > > >Confidential:   no
 > > >Severity:       serious
 > > >Priority:       medium
 > > >Responsible:    unassigned
 > > >State:          open
 > > >Class:          sw-bug
 > > >Submitter-Id:   net
 > > >Arrival-Date:   Wed Aug 07 17:58:00 PDT 2002
 > > >Closed-Date:
 > > >Last-Modified:
 > > >Originator:     John Carter
 > > >Release:        5.2.1
 > > >Organization:
 > > >Environment:
 > > Solaris UltraSparc 2.5.1
 > > >Description:
 > > gdb segfaults and core dumps whilst trying to load a core file.
 > > 
 > > Inspecting the core produced by gdb shows that it occurs at
 > > /gdb-5.2.1/gdb/gdbtypes.c:420
 > > 
 > > Looking at the code ....
 > > make_cv_type (int cnst, int voltl, struct type *type, struct type **typeptr)
 > > {
 > >   register struct type *ntype;	/* New type */
 > >   register struct type *tmp_type = type;	/* tmp type */
 > >   struct objfile *objfile;
 > > 
 > >   ntype = TYPE_CV_TYPE (type);
 > > 
 > >   while (ntype != type)
 > >     {
 > >       if ((TYPE_CONST (ntype) == cnst) && <<<<<==SEGFAULT HERE
 > > 	  (TYPE_VOLATILE (ntype) == voltl))
 > > 	{
 > > 	  if (typeptr == 0)
 > > 	    return ntype;
 > > 	  else if (*typeptr == 0)
 > > 	    {
 > > 	      *typeptr = ntype;	/* Tracking alloc, and we have new type.  */
 > > 	      return ntype;
 > > 	    }
 > > 	}
 > >       tmp_type = ntype;
 > >       ntype = TYPE_CV_TYPE (ntype);
 > >     }
 > > ===============================
 > > 
 > > At that point ntype was zero, but type wasn't.
 > > 
 > > The bug is perhaps not here, this is perhaps just the symptom.
 > > >How-To-Repeat:
 > > Unfortunately can't narrow it down much at this stage.
 > 
 > If you can reproduce this (sounds like you can?) could you try a CVS
 > snapshot of GDB?  See http://sources.redhat.com/gdb/.  I believe this
 > is fixed now, but I'm not quite sure.
 > 
 > 
 
 -- 
 
 
 John Carter                             Phone : (64)(3) 358 6639
 Tait Electronics                        Fax   : (64)(3) 359 4632
 PO Box 1645 Christchurch                Email : john.carter@tait.co.nz
 New Zealand
 
 Good Ideas:
 Ruby                 - http://www.ruby-lang-org - The best of perl,python,scheme without the pain.
 Trident Thai noodles - Who says instant noodles must be bland?
 Free your books      - http://www.bookcrossing.com
 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]