diff options
author | Shigeru Chiba <chibash@users.noreply.github.com> | 2023-12-16 22:04:12 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-16 22:04:12 +0900 |
commit | 3325b4969e0f883f02fe48c9fe3d4376ef4ad260 (patch) | |
tree | 4f685bfd161ef50a8a1fa67b8a57e483625f42dc /src | |
parent | 8cd171c4db6a46327a6f25d813567e3c477a6566 (diff) | |
parent | 2cdc0275b7c7d66a942708e22c07fdbd0246203a (diff) | |
download | javassist-3325b4969e0f883f02fe48c9fe3d4376ef4ad260.tar.gz javassist-3325b4969e0f883f02fe48c9fe3d4376ef4ad260.zip |
Merge pull request #469 from shifujun/insertAuxInitializer_stacksize
Fix insertAuxInitializer may cause inconsistent stack height problem
Diffstat (limited to 'src')
-rw-r--r-- | src/main/javassist/CtClassType.java | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/main/javassist/CtClassType.java b/src/main/javassist/CtClassType.java index 22b873a6..f4345e0a 100644 --- a/src/main/javassist/CtClassType.java +++ b/src/main/javassist/CtClassType.java @@ -1763,8 +1763,7 @@ class CtClassType extends CtClass { int pos = it.insertEx(initializer.get()); it.insert(initializer.getExceptionTable(), pos); int maxstack = codeAttr.getMaxStack(); - if (maxstack < stacksize) - codeAttr.setMaxStack(stacksize); + codeAttr.setMaxStack(maxstack + stacksize); } private int makeFieldInitializer(Bytecode code, CtClass[] parameters) |