diff --git a/ChangeLog b/ChangeLog index aad46dc84..140b1ce2c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2010-08-07 Robert Larice + * src/frontend/parse-bison.c , + * src/frontend/parse-bison.h , + * src/frontend/parse-bison.y : + bug fix, + avoid segfault, caused when parsing an unknown function in parse-bison.y + 2010-08-07 Dietmar Warning spicelib/devices/*/b4soimask.c, csw*.c, mos6load.c, soi3load.c, swnoise.c: fix some wrong 'double' to 'int' assignments diff --git a/src/frontend/parse-bison.c b/src/frontend/parse-bison.c index b6216a6c1..8bf1edc50 100644 --- a/src/frontend/parse-bison.c +++ b/src/frontend/parse-bison.c @@ -161,7 +161,7 @@ typedef union YYSTYPE const char *str; struct pnode *pnode; } -/* Line 193 of yacc.c. */ +/* Line 187 of yacc.c. */ #line 166 "parse-bison.c" YYSTYPE; # define yystype YYSTYPE /* obsolescent; will be withdrawn */ @@ -1579,7 +1579,7 @@ yyreduce: case 19: #line 142 "parse-bison.y" - { (yyval.pnode) = mkfnode((yyvsp[(1) - (4)].str), (yyvsp[(3) - (4)].pnode)); ;} + { (yyval.pnode) = mkfnode((yyvsp[(1) - (4)].str), (yyvsp[(3) - (4)].pnode)); if(!(yyval.pnode)) YYABORT; ;} break; case 20: diff --git a/src/frontend/parse-bison.h b/src/frontend/parse-bison.h index 2e960387e..1657dc415 100644 --- a/src/frontend/parse-bison.h +++ b/src/frontend/parse-bison.h @@ -70,7 +70,7 @@ typedef union YYSTYPE const char *str; struct pnode *pnode; } -/* Line 1529 of yacc.c. */ +/* Line 1489 of yacc.c. */ #line 75 "parse-bison.h" YYSTYPE; # define yystype YYSTYPE /* obsolescent; will be withdrawn */ diff --git a/src/frontend/parse-bison.y b/src/frontend/parse-bison.y index e2b1453c6..070aef64a 100644 --- a/src/frontend/parse-bison.y +++ b/src/frontend/parse-bison.y @@ -139,7 +139,7 @@ exp: | '-' exp %prec NEG { $$ = mkunode(UMINUS, $2); } | '~' exp { $$ = mkunode(NOT, $2); } - | TOK_STR '(' exp ')' { $$ = mkfnode($1, $3); } + | TOK_STR '(' exp ')' { $$ = mkfnode($1, $3); if(!$$) YYABORT; } | exp '=' exp { $$ = mkbnode(EQ, $1, $3); } | exp TOK_NE exp { $$ = mkbnode(NE, $1, $3); }