Infinite loop in make_cv_type
Richard Earnshaw
rearnsha@arm.com
Fri Feb 22 09:41:00 GMT 2002
> 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.
More information about the Gdb-patches
mailing list