Commit 247a7a7a authored by Eric Bruneton's avatar Eric Bruneton

Restore bug fix, make previously added test pass.

parent cb856df7
Pipeline #774 passed with stage
in 6 minutes and 2 seconds
......@@ -334,6 +334,17 @@ public class JSRInlinerAdapter extends MethodNode implements Opcodes {
// Use tail recursion here in the form of an outer while loop to
// avoid our stack growing needlessly:
index++;
// We implicitly assumed above that execution can always fall
// through to the next instruction after a JSR. But a subroutine may
// never return, in which case the code after the JSR is unreachable
// and can be anything. In particular, it can seem to fall off the
// end of the method, so we must handle this case here (we could
// instead detect whether execution can return or not from a JSR,
// but this is more complicated).
if (index >= instructions.size()) {
return;
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment