This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: Infinite loop in make_cv_type
- From: Richard Earnshaw <rearnsha at arm dot com>
- To: Michael Snyder <msnyder at redhat dot com>
- Cc: Daniel Jacobowitz <drow at mvista dot com>, Richard dot Earnshaw at arm dot com, gdb-patches at sources dot redhat dot com
- Date: Fri, 22 Feb 2002 17:40:10 +0000
- Subject: Re: Infinite loop in make_cv_type
- Organization: ARM Ltd.
- Reply-to: Richard dot Earnshaw at arm dot com
> Daniel Jacobowitz wrote:
> >
> > On Fri, Feb 22, 2002 at 11:40:38AM +0000, Richard Earnshaw wrote:
> > > While testing cplusfuncs.exp on ARM/NetBSD (a.out) with gcc-3 current, gdb
> > > is getting stuck in an infinite loop in gdbtypes.c:make_cv_type and I'm
> > > trying to work out what this is supposed to do. The scenario I'm seeing
> > > is that the type ring has become corrupted as follows along the
> > > TYPE_CV_TYPE chain
> > >
> > > type
> > > |
> > > V
> > > var1<----+
> > > | |
> > > +------+
> > >
> > > Given that this is supposed to be a loop, it's clearly bogus.
> >
> > Definitely.
>
> Hang on, I'm pretty sure that the cv type chain
> is supposed to do that. The pointer loop is
> intentional.
Well if that's the case then the top loop in make_cv_type is completely
bogus, since it expects to iterate until ntype==type (where type is the
base type).
The comment in gdbtypes.h says that cv_type is a ring of the type and its
variants.
R.