lalr1.cc: fix exception safety

lalr1.cc does not reclaim its memory when ended by an exception.

Reported by Oleksii Taran:
http://lists.gnu.org/archive/html/help-bison/2012-09/msg00000.html

* data/lalr1.cc (yyparse): Protect the whole yyparse by a try-catch
block that cleans the stack and the lookahead.
This commit is contained in:
Akim Demaille
2012-09-20 16:59:29 +02:00
parent cff926615f
commit 7e1fabbeae
2 changed files with 39 additions and 7 deletions

1
THANKS
View File

@@ -80,6 +80,7 @@ Nicolas Tisserand nicolas.tisserand@epita.fr
Noah Friedman friedman@gnu.org
Odd Arild Olsen oao@fibula.no
Oleg Smolsky oleg.smolsky@pacific-simulators.co.nz
Oleksii Taran oleksii.taran@gmail.com
Paolo Bonzini bonzini@gnu.org
Pascal Bart pascal.bart@epita.fr
Paul Eggert eggert@cs.ucla.edu