Bug#851051: bison: using YYERROR in empty rule leads to segmentation fault

2018-10-29 Thread Akim Demaille
On Wed, 11 Jan 2017 20:50:16 +0100 Simon Richter wrote: > Package: bison > Version: 2:3.0.4.dfsg-1 > Severity: normal > Tags: upstream > > Hi, > > if an empty rule matches, but calls YYERROR, the parser catches a > segmentation fault in the line > > yyerror_range[1].location = yystack_[yyle

Bug#851051: bison: using YYERROR in empty rule leads to segmentation fault

2017-01-11 Thread Simon Richter
Package: bison Version: 2:3.0.4.dfsg-1 Severity: normal Tags: upstream Hi, if an empty rule matches, but calls YYERROR, the parser catches a segmentation fault in the line yyerror_range[1].location = yystack_[yylen - 1].location; inside the error handling, because yylen is 0, (yylen-1) unde