Skip to content

[CALCITE-6393] Add bytecode verification check using ASM in the gradle build#5090

Closed
thomasrebele wants to merge 1 commit into
apache:mainfrom
thomasrebele:tr/CALCITE-6393
Closed

[CALCITE-6393] Add bytecode verification check using ASM in the gradle build#5090
thomasrebele wants to merge 1 commit into
apache:mainfrom
thomasrebele:tr/CALCITE-6393

Conversation

@thomasrebele

@thomasrebele thomasrebele commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Superseded by #5092


This is a rebase of @zabetak's PR #3783. I've fixed some warnings by adapting AsmCheckerTask to Gradle 8. I had to exclude spark/build/sparkServer/classes, as the classes in that dir failed the check.

I've verified the functionality by building with JDK8. It indeed produces java.lang.RuntimeException: Invalid bytecode file:/home/trebele/dev/calcite/c1/core/build/classes/java/main/org/apache/calcite/runtime/SqlFunctions.class when running ./gradlew build. The build passes with JDK17 and JDK21.

Here the versions that I've used:

$ /usr/lib/jvm/java-8-openjdk-amd64/bin/java -version
openjdk version "1.8.0_492"
OpenJDK Runtime Environment (build 1.8.0_492-8u492-ga~us2-0ubuntu1~24.04.1-b09)
OpenJDK 64-Bit Server VM (build 25.492-b09, mixed mode)
$ /usr/lib/jvm/java-17-openjdk-amd64/bin/java -version
openjdk version "17.0.19" 2026-04-21
OpenJDK Runtime Environment (build 17.0.19+10-1-24.04.2-Ubuntu)
OpenJDK 64-Bit Server VM (build 17.0.19+10-1-24.04.2-Ubuntu, mixed mode, sharing)
$ /usr/lib/jvm/java-21-openjdk-amd64/bin/java -version
openjdk version "21.0.11" 2026-04-21
OpenJDK Runtime Environment (build 21.0.11+10-1-24.04.2-Ubuntu)
OpenJDK 64-Bit Server VM (build 21.0.11+10-1-24.04.2-Ubuntu, mixed mode, sharing)

Jira Link

CALCITE-6393

Changes Proposed

This PR proposes to add a check to fail the build if it produced invalid bytecode.

@sonarqubecloud

Copy link
Copy Markdown

@thomasrebele

Copy link
Copy Markdown
Contributor Author

Superseded by #5092.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants