Exception: Unexpected label context
Øystein Myhre Andersen
o.myhre at gmail.com
Tue Jul 16 10:30:38 UTC 2024
I got:
Exception in thread "main" java.lang.IllegalStateException: Unexpected
label context CodeBuilder[id=1816757085] in =CodeBuilder[id=1730173572]
at ... DirectCodeBuilder.labelToBci(DirectCodeBuilder.java:702)
at ... DirectCodeBuilder.writeLabelOffset(DirectCodeBuilder.java:465)
at ... DirectCodeBuilder.writeTableSwitch(DirectCodeBuilder.java:577)
I did some tests and found that bci had become greater than the max short
value.
I guessed the Method was too big. Then I split it up.
That solved the problem !
Perhaps 'labelToBci' should check if bci became too large and in that case
give an error: "Method too large"
- Øystein Myhre Andersen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/classfile-api-dev/attachments/20240716/67706570/attachment.htm>
More information about the classfile-api-dev
mailing list