mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 23:04:50 +02:00
8335475: ClassBuilder incorrectly calculates max_locals in some cases
Reviewed-by: asotona
This commit is contained in:
parent
27982c8f5d
commit
1ef34c1833
2 changed files with 32 additions and 4 deletions
|
@ -1046,7 +1046,7 @@ public final class StackMapGenerator {
|
|||
void setLocalsFromArg(String name, MethodTypeDesc methodDesc, boolean isStatic, Type thisKlass) {
|
||||
int localsSize = 0;
|
||||
// Pre-emptively create a locals array that encompass all parameter slots
|
||||
checkLocal(methodDesc.parameterCount() + (isStatic ? 0 : -1));
|
||||
checkLocal(methodDesc.parameterCount() + (isStatic ? -1 : 0));
|
||||
if (!isStatic) {
|
||||
localsSize++;
|
||||
if (OBJECT_INITIALIZER_NAME.equals(name) && !CD_Object.equals(thisKlass.sym)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue