forked from Imagelibrary/binutils-gdb
Fix assert in c-exp.y
The "restrict" patch added some asserts to c-exp.y, but one spot was copy-pasted and referred to the wrong table. This was pointed out by -fsanitize=address. This patch fixes the bug. gdb/ChangeLog 2020-03-20 Tom Tromey <tromey@adacore.com> * c-exp.y (lex_one_token): Fix assert.
This commit is contained in:
@@ -1,3 +1,7 @@
|
|||||||
|
2020-03-20 Tom Tromey <tromey@adacore.com>
|
||||||
|
|
||||||
|
* c-exp.y (lex_one_token): Fix assert.
|
||||||
|
|
||||||
2020-03-20 Tom Tromey <tromey@adacore.com>
|
2020-03-20 Tom Tromey <tromey@adacore.com>
|
||||||
|
|
||||||
* ada-tasks.c (read_atcb): Use smaller length in strncpy call.
|
* ada-tasks.c (read_atcb): Use smaller length in strncpy call.
|
||||||
|
|||||||
@@ -2580,7 +2580,7 @@ lex_one_token (struct parser_state *par_state, bool *is_quoted_name)
|
|||||||
if ((tokentab2[i].flags & FLAG_CXX) != 0
|
if ((tokentab2[i].flags & FLAG_CXX) != 0
|
||||||
&& par_state->language ()->la_language != language_cplus)
|
&& par_state->language ()->la_language != language_cplus)
|
||||||
break;
|
break;
|
||||||
gdb_assert ((tokentab3[i].flags & FLAG_C) == 0);
|
gdb_assert ((tokentab2[i].flags & FLAG_C) == 0);
|
||||||
|
|
||||||
pstate->lexptr += 2;
|
pstate->lexptr += 2;
|
||||||
yylval.opcode = tokentab2[i].opcode;
|
yylval.opcode = tokentab2[i].opcode;
|
||||||
|
|||||||
Reference in New Issue
Block a user