Stack size miscalculated with try-catch blocks
Adam Sotona
adam.sotona at oracle.com
Wed Oct 30 09:19:00 UTC 2024
Hi Rafael,
Please update to the latest codebase, maxstack of the provided test case is correctly calculated now.
Thanks,
Adam
From: classfile-api-dev <classfile-api-dev-retn at openjdk.org> on behalf of Rafael Winterhalter <rafael.wth at gmail.com>
Date: Thursday, 24 October 2024 at 8:33
To: classfile-api-dev <classfile-api-dev at openjdk.org>
Subject: Stack size miscalculated with try-catch blocks
Hello,
when testing a recent build of the JDK with my bridge to ASM, I encountered some test failures. This is related to the stack size of a method being calculated with an additional, unnecessary slot. This can be reproduced using https://github.com/raphw/asm-jdk-bridge
This can also be reproduced by inspecting the computed stack for:
void c() {
try {
throw new RuntimeException();
} catch (RuntimeException e) {
}
}
which will be computed as 3 and not 2.
Best regards, Rafael
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/classfile-api-dev/attachments/20241030/fbe98a4f/attachment-0001.htm>
More information about the classfile-api-dev
mailing list