bug-bison
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

page fault when YYFAIL explicitly called


From: Stanislav Lang
Subject: page fault when YYFAIL explicitly called
Date: Tue, 17 Sep 2013 09:23:38 +0200 (CEST)

Hallo,
in Bison 2.4 and higher there is a problem, that when I cal YYFAIL 
explicitly in my code a page fault occurs.

In yyerrorlab (for YYERROR) there is yylen set to zero (yylen=0), ant then 
is in yyerrlab1 the stack cleaned and in yyreturn is already YYPOPSRTACK(0) 
called, that is right.




But when I call YYFAIL explicitly (I deed it for syntax error reports), 
there is in yyerrlab the value of yylen not changed, then in yyerrlab1 is 
the stack cleaned and then in yyreturn is YYPOPSTACK(yylen) called where the
yylen is not equal to zero!!! then the while loop in yyreturn do not stop 
and then a pagefault orrucs.




I have it solved by using my own macro YYFAIL1:


#define YYFAIL1 { yylen = 0; \

                  goto yyerrlab;}





but i thing, it should be solved in Bison template already.




Best regulars

Stanislav Lang


reply via email to

[Prev in Thread] Current Thread [Next in Thread]