This is the mail archive of the gdb-patches@sourceware.org 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: RFC: fix PR symtab/11464


On Mon, 04 Feb 2013 22:47:05 +0100, Tom Tromey wrote:
> Jan> I do not see there a regression; this does not mean much for c-exp.y.
> 
> Tom> I'll look.
> Tom> It may be more visible under valgrind.
> 
> For me it reliably fails the 'ptype':
> 
> (gdb) ptype gnu_obj_1::'~gnu_obj_1'
> Segmentation fault (core dumped)

I really have the full testsuite without regressions.  I do not see why it
crashes for you.  Tried on Fedora Rawhide, both with -lmcheck and without
-lmcheck.

This case gnu_obj_1::'~gnu_obj_1' does not get handled there as the parser
parses it as:
   $1 = token TYPENAME ()
   $2 = token COLONCOLON ()
   $3 = nterm name ()
and when it sees '~gnu_obj_1' classify_inner_name returns ERROR.

Without these two lines:
        if (classification == NAME)
          break;
the loop goes again, last_was_coloncolon == 0 in
      if (next.token == NAME && last_was_coloncolon)
So it just stores back the fetched next token
          /* We've reached the end of the name.  */
          VEC_safe_push (token_and_value, token_fifo, &next);
and also does "break;".

So I still believe those two lines
        if (classification == NAME)
          break;
are just some cleanup/simplification but not required by this patch.


Thanks,
Jan


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