-
Bug
-
Resolution: Done
-
Major
-
None
-
False
-
None
-
False
-
---
-
-
The `LocalVariablesSorter` utility from ASM is prone to misuse [1], which is exactly what happened in the Logging with Panache bytecode transformation. As a result, the transformed bytecode didn't obey the JVM stack discipline, leading to verification errors or possibly incorrect log messages.
With this commit, instructions that refer to the newly allocated local variables are emitted directly through the original `MethodVisitor`, bypassing the `LocalVariablesSorter`. Therefore, local variable slot numbers in these instructions are not transformed and will not refer to wrong local variables.
Fixes #32663