[ 
https://issues.apache.org/jira/browse/CALCITE-6393?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17842378#comment-17842378
 ] 

Sergey Nuyanzin commented on CALCITE-6393:
------------------------------------------

It looks like there are 2 issues
1. ArrayIndexOutOfBoundsException (by the way  ArrayIndexOutOfBoundsException 
is only if it was built with jdk1.8, in case it was built with other jdk e.g. 
11+ then there will another Exception) 
   as {{bisect}} shows it started being reproduced after this commit 
https://github.com/apache/calcite/commit/bcf6bd8577b25c563b1c597c70704594a18ca1a3
   further analysis shows that the reason is having of {{assert}} in code in 
this class.
   Removal of asserts fixes this issue

2. {noformat}    java.lang.IllegalArgumentException: Invalid end label (must be 
visited first){noformat}
it looks like it came together with CALCITE-4199 with checkerframework
currently not clear how to fix it however there is at least one WA: if we build 
Calcite with jdk11+ then it disappears

> Byte code of SqlFunctions is invalid
> ------------------------------------
>
>                 Key: CALCITE-6393
>                 URL: https://issues.apache.org/jira/browse/CALCITE-6393
>             Project: Calcite
>          Issue Type: Bug
>            Reporter: Sergey Nuyanzin
>            Priority: Major
>
> The issue is a result of testing of Apache Calcite 1.37.0 rc 4 in this thread 
> [1]
> There is test project andprocedure provided by [~MasseGuillaume]
> it shows that since Calcite 1.36.0 it starts failing as 
> {noformat}
>     java.lang.ArrayIndexOutOfBoundsException: Index 65536 out of bounds for 
> length 297
>         at org.objectweb.asm.ClassReader.readLabel(ClassReader.java:2695)
>         at org.objectweb.asm.ClassReader.createLabel(ClassReader.java:2711)
>         at 
> org.objectweb.asm.ClassReader.readTypeAnnotations(ClassReader.java:2777)
>         at org.objectweb.asm.ClassReader.readCode(ClassReader.java:1929)
>         at org.objectweb.asm.ClassReader.readMethod(ClassReader.java:1515)
>         at org.objectweb.asm.ClassReader.accept(ClassReader.java:745)
> {noformat}
> Also  since Calcite 1.27.0 it starts failing as 
> {noformat}
>     java.lang.IllegalArgumentException: Invalid end label (must be visited 
> first)
>         at 
> org.objectweb.asm.util.CheckMethodAdapter.checkLabel(CheckMethodAdapter.java:1453)
>         at 
> org.objectweb.asm.util.CheckMethodAdapter.visitLocalVariableAnnotation(CheckMethodAdapter.java:996)
>         at 
> org.objectweb.asm.MethodVisitor.visitLocalVariableAnnotation(MethodVisitor.java:757)
>         at 
> org.objectweb.asm.commons.MethodRemapper.visitLocalVariableAnnotation(MethodRemapper.java:257)
>         at org.objectweb.asm.ClassReader.readCode(ClassReader.java:2614)
>         at org.objectweb.asm.ClassReader.readMethod(ClassReader.java:1515)
> {noformat}
> [1] https://lists.apache.org/thread/n6cs1l86mt6fc5q8pcxr97czs3p6w65f
> [2] https://github.com/MasseGuillaume/asm-remapper-bug



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to