[
https://issues.apache.org/jira/browse/SANDBOX-476?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13989418#comment-13989418
]
Emmanuel Bourg commented on SANDBOX-476:
----------------------------------------
I noticed this issue too and asked on the asm mailing list:
http://mail.ow2.org/wws/arc/asm/2014-04/msg00016.html
Here was the response from Eliot Moss:
{quote}
It's probably a misuse of the API. In the given code, a question would be
whether
startLabel has been visited. But visitMaxs will complain about *any* Label that
was used in the code if that Label was not eventually visited with visitLabel.
So the error could well be somewhere else in a transformer.
But I agree that it is at least a bit mysterious if it worked before and now is
not!
{quote}
> [asm] IllegalStateException: "Undefined label used" with ASM > 4.1
> ------------------------------------------------------------------
>
> Key: SANDBOX-476
> URL: https://issues.apache.org/jira/browse/SANDBOX-476
> Project: Commons Sandbox
> Issue Type: Bug
> Components: Javaflow
> Affects Versions: Nightly Builds
> Reporter: Alexandre Chatiron
> Labels: asm, label
>
> I want to upgrade Commons Javaflow from ASM 4 to 5 (same problem with 4.1 )
> and I get this exception:
> {code}
> java.lang.IllegalStateException: Undefined label used
> at org.objectweb.asm.util.CheckMethodAdapter.visitMaxs(Unknown Source)
> at
> org.apache.commons.javaflow.bytecode.transformation.asm.ContinuationMethodAdapter.visitMaxs(ContinuationMethodAdapter.java:313)
> at org.objectweb.asm.tree.MethodNode.accept(Unknown Source)
> at
> org.apache.commons.javaflow.bytecode.transformation.asm.ContinuationMethodAnalyzer.visitEnd(ContinuationMethodAnalyzer.java:140)
> {code}
> the code triggering this error is:
> {code:java}
> public void visitMaxs(int maxStack, int maxLocals) {
> Label endLabel = new Label();
> mv.visitLabel(endLabel);
> mv.visitLocalVariable("__stackRecorder", "L" + STACK_RECORDER + ";",
> null, startLabel, endLabel, stackRecorderVar);
> mv.visitMaxs(0, 0);
> }
> {code}
> Any idea how to fix that?
--
This message was sent by Atlassian JIRA
(v6.2#6252)