Skip to content

Commit

Permalink
Fix IOOBE in finally processing when the head block is empty
Browse files Browse the repository at this point in the history
  • Loading branch information
jaskarth committed Aug 17, 2024
1 parent 0c3b8af commit e62bc97
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,11 @@ private Record getFinallyInformation(StructClass cl, StructMethod mt, RootStatem

BasicBlockStatement firstBlockStatement = fstat.getHandler().getBasichead();
BasicBlock firstBasicBlock = firstBlockStatement.getBlock();

if (firstBasicBlock.getSeq().isEmpty()) {
return null;
}

Instruction instrFirst = firstBasicBlock.getInstruction(0);

int firstcode = 0;
Expand Down

0 comments on commit e62bc97

Please sign in to comment.