Skip to content

Commit

Permalink
fix: FindReturnRef throws an IllegalArgumentException unexpectedly
Browse files Browse the repository at this point in the history
IllegalArgumentException is thrown when CHECKCAST bytecode is used
even when the operand stack is TOP.

close #2019
  • Loading branch information
KengoTODA committed Apr 19, 2022
1 parent c7f7c02 commit 2a569c7
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -296,7 +296,7 @@ public void afterOpcode(int seen) {
}
}

if (seen == Const.CHECKCAST) {
if (seen == Const.CHECKCAST && !stack.isTop()) {
OpcodeStack.Item item = stack.getStackItem(0);
if (fieldCloneUnderCast != null) {
arrayFieldClones.put(item, fieldCloneUnderCast);
Expand Down

0 comments on commit 2a569c7

Please sign in to comment.