See 4357968. The compiler emits an unreachable return instruction in a
value-returning function. This confuses some VMs including the KVM and
the 1.2.2 JIT. While it may be arguably legal, it would be better to either
emit the correct return instruction or anything else - like a small
infinite loop - that won't confuse these VMs.
Perhaps it would be better to use a more clever code generation
strategy that is able to avoid generating any dead code at all. Be
that as it may, better to generate valid dead code than invalid dead code.
Object myMethod() {
Object retVal=null;
try {
...
} except() {
...
} finally {
return retVal;
}
}
neal.gafter@Eng 2001-02-15
value-returning function. This confuses some VMs including the KVM and
the 1.2.2 JIT. While it may be arguably legal, it would be better to either
emit the correct return instruction or anything else - like a small
infinite loop - that won't confuse these VMs.
Perhaps it would be better to use a more clever code generation
strategy that is able to avoid generating any dead code at all. Be
that as it may, better to generate valid dead code than invalid dead code.
Object myMethod() {
Object retVal=null;
try {
...
} except() {
...
} finally {
return retVal;
}
}
neal.gafter@Eng 2001-02-15
- duplicates
-
JDK-4761541 SEGV with JIT in 1.2.2_13
-
- Closed
-