mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-09-08 09:27:06 +00:00
java: fix parser stack popping bug.
Reported at <http://lists.gnu.org/archive/html/bug-bison/2011-02/msg00005.html>. * THANKS (Angelo Borsotti): Add. * data/lalr1.java (YYParser::YYStack::pop): Fix off-by-one error in clearing the value stack. Previously, the top element of the stack wasn't cleared and so the value was not garbage collected.
This commit is contained in:
committed by
Joel E. Denny
parent
121c498280
commit
6f75992be5
@@ -1,3 +1,13 @@
|
|||||||
|
2011-03-06 Angelo Borsotti <[email protected]> (tiny change)
|
||||||
|
|
||||||
|
java: fix parser stack popping bug.
|
||||||
|
Reported at
|
||||||
|
<http://lists.gnu.org/archive/html/bug-bison/2011-02/msg00005.html>.
|
||||||
|
* THANKS (Angelo Borsotti): Add.
|
||||||
|
* data/lalr1.java (YYParser::YYStack::pop): Fix off-by-one error
|
||||||
|
in clearing the value stack. Previously, the top element of the
|
||||||
|
stack wasn't cleared and so the value was not garbage collected.
|
||||||
|
|
||||||
2011-03-06 Joel E. Denny <[email protected]>
|
2011-03-06 Joel E. Denny <[email protected]>
|
||||||
|
|
||||||
doc: cite publication for LAC.
|
doc: cite publication for LAC.
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ Alexander Belopolsky [email protected]
|
|||||||
Alexandre Duret-Lutz [email protected]
|
Alexandre Duret-Lutz [email protected]
|
||||||
Andreas Schwab [email protected]
|
Andreas Schwab [email protected]
|
||||||
Andrew Suffield [email protected]
|
Andrew Suffield [email protected]
|
||||||
|
Angelo Borsotti [email protected]
|
||||||
Anthony Heading [email protected]
|
Anthony Heading [email protected]
|
||||||
Arnold Robbins [email protected]
|
Arnold Robbins [email protected]
|
||||||
Art Haas [email protected]
|
Art Haas [email protected]
|
||||||
|
|||||||
+1
-1
@@ -261,7 +261,7 @@ b4_lexer_if([[
|
|||||||
public final void pop (int num) {
|
public final void pop (int num) {
|
||||||
// Avoid memory leaks... garbage collection is a white lie!
|
// Avoid memory leaks... garbage collection is a white lie!
|
||||||
if (num > 0) {
|
if (num > 0) {
|
||||||
java.util.Arrays.fill (valueStack, height - num + 1, height, null);
|
java.util.Arrays.fill (valueStack, height - num + 1, height + 1, null);
|
||||||
]b4_locations_if([[java.util.Arrays.fill (locStack, height - num + 1, height, null);]])[
|
]b4_locations_if([[java.util.Arrays.fill (locStack, height - num + 1, height, null);]])[
|
||||||
}
|
}
|
||||||
height -= num;
|
height -= num;
|
||||||
|
|||||||
Reference in New Issue
Block a user