[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] work around bug in older bytecode verifiers
From: |
Paolo Bonzini |
Subject: |
[PATCH] work around bug in older bytecode verifiers |
Date: |
Mon, 05 Feb 2007 10:34:08 +0100 |
User-agent: |
Thunderbird 1.5.0.9 (Macintosh/20061207) |
... but even not so old, as gcj 4.1.1 has this bug.
These disallow access to the private fields of an inner class, from the
outer class. In this case the inner class is the parse stack, the outer
class is the Bison-generated parser.
However, we can make Stack's field public because user code doesn't have
access to the instance of Stack used by parse(). I'll commit this as
soon as the regression tests end.
Paolo
2007-02-05 Paolo Bonzini <address@hidden>
* data/lalr1.java (Stack): Work around old verifiers that disallow
access to the private fields of an inner class, from the outer class.
We can make Stack's field public because user code doesn't have access
to the instance of Stack used by parse().
Index: lalr1.java
===================================================================
RCS file: /sources/bison/bison/data/lalr1.java,v
retrieving revision 1.1
diff -u -r1.1 lalr1.java
--- lalr1.java 29 Jan 2007 10:54:42 -0000 1.1
+++ lalr1.java 5 Feb 2007 09:25:53 -0000
@@ -220,8 +220,8 @@
]b4_locations_if([[private ]b4_location_type[[] locStack = new
]b4_location_type[[16];]])[
private ]b4_union_name[[] valueStack = new ]b4_union_name[[16];
- private int size = 16;
- private int height = -1;
+ public int size = 16;
+ public int height = -1;
public final void push (int state, ]b4_union_name[ value]dnl
b4_locations_if([, ]b4_location_type[ loc])[) {
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [PATCH] work around bug in older bytecode verifiers,
Paolo Bonzini <=