oakc will compile the following code. When it is run it causes the
interpreter to SEGV. I am not sure if the situation is detectable at
sompile time or not,. This bug may have to be refiled againats the
interpreter.
class AbstractBugClass {
abstract int read();
}
class BugClass extends AbstractBugClass {
public int read() {
return super.read();
}
public static void main(String args[]) {
BugClass b = new BugClass();
b.read();
}
}
This is partly a compiler problem, it should not allow this
invokation. But the interpreter should not SEGV.
interpreter to SEGV. I am not sure if the situation is detectable at
sompile time or not,. This bug may have to be refiled againats the
interpreter.
class AbstractBugClass {
abstract int read();
}
class BugClass extends AbstractBugClass {
public int read() {
return super.read();
}
public static void main(String args[]) {
BugClass b = new BugClass();
b.read();
}
}
This is partly a compiler problem, it should not allow this
invokation. But the interpreter should not SEGV.
- relates to
-
JDK-1184016 compiler does not flag illegal access to abstract superclass method.
-
- Closed
-