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-10-06 19:53:45 +02:00
parent cff926615f
commit 7e1fabbeae
2 changed files with 39 additions and 7 deletions
+1
View File
@@ -80,6 +80,7 @@ Nicolas Tisserand [email protected]
Noah Friedman [email protected]
Odd Arild Olsen [email protected]
Oleg Smolsky [email protected]
Oleksii Taran [email protected]
Paolo Bonzini [email protected]
Pascal Bart [email protected]
Paul Eggert [email protected]