Skip to content

Support JDK 27 - #1075

Draft
kyakdan wants to merge 7 commits into
mainfrom
kyakdan-asm-java-27-support
Draft

kyakdan wants to merge 7 commits into
mainfrom
kyakdan-asm-java-27-support

Conversation

@kyakdan

@kyakdan kyakdan commented Dec 1, 2026 •

Copy link
Copy Markdown
Member

Agent assessment

Self-reported assessment, not an independent review.

Assessed revision: 0c646c0a098c068c306e27d22f68b88c6a0fd2d8

Dimension Assessment Rationale
Change confidence 9/10 ↑ Fork CI passes all 12 jobs (Linux x64, Linux arm64, Windows, macOS × JDK 8/21/27) and the formatting check on this commit.
↑ New tests fail without their fixes (ASM 9.9.1, old AgentInstaller, missing guards).
↑ Four review rounds by three model families ended ready to push.
↓ The contrib_rules_jvm patch was added after those reviews and is covered by CI only, not by another review round.
Diagnosis confidence 9.5/10 ↑ Reproduced Unsupported class file major version 71 on JDK 27 with ASM 9.9.1, gone with 9.11.1.
↑ ASM 9.10 release notes add Java 27 support.
Evidence fit 9/10 ↑ The issue's stack trace starts in ASM's ClassReader called from HookInstrumentor, the code path the new test exercises.
↓ The reporter's exact project wasn't run.

Fixes #1074.

Jazzer couldn't instrument Java 27 class files, so on JDK 27 classes silently loaded without coverage or hooks. This PR fixes that, enables native access for Jazzer's own JNI libraries, and adds JDK 27 to CI.

Commits

  1. ASM 9.9.1 → 9.11.1, which reads class files up to Java 28. The new test runs a class patched to versions 71 and 72 through all instrumentors.
  2. --enable-native-access=ALL-UNNAMED in the jazzer launcher and the fuzz-test wrapper. JDK 24+ warns when Jazzer loads its native libraries without it, and JEP 472 plans to deny it in a future release.
  3. Clear error when native access is denied, instead of nested exceptions from Agent.install.
  4. Docs: JUnit users pass --enable-native-access=ALL-UNNAMED (with -XX:+IgnoreUnrecognizedVMOptions) to the test JVM.
  5. Tests ignore the JDK's sun.misc.Unsafe warnings until Jazzer moves off Unsafe (Jazzer runtime calls sun.misc.Unsafe memory-access methods that JDK 24+ warns about (JEP 471/498) #1069).
  6. JUnit 5 tests start on JDK 24+: a patch removes the -Djava.security.manager=allow that contrib_rules_jvm 0.27.0 always passes, which JDK 24+ rejects.
  7. CI on JDK 27 (Zulu 27.0.1.1).

Notes for reviewers

  • contrib_rules_jvm stays at 0.27.0 and is patched (commit 6). Versions ≥ 0.32 drop the flag but pass the JUnit runner a relative -javaagent path, which breaks all JUnit 5 tests on Windows unless runfiles are enabled there. rules_java still adds the flag on JDK 17–23, which need it for the runner's System.exit protection.
  • JUnit 5 tests on JDK 27 run without that System.exit protection, since JDK 24+ has no security manager.

CI

Upstream Actions are locked by the billing issue, so this PR's checks fail without running. CI ran on the fork for the head commit:

ASM 9.9.1 rejects class files newer than Java 26 (#1074). ASM 9.11.1 supports up to Java 28.
JDK 24+ warns when Jazzer loads its native libraries without native access enabled, and a future JDK will deny it.
By default, installing the agent loads Jazzer's native library. A JVM started with --illegal-native-access=deny made it fail with nested exceptions deep inside Jazzer, so name the required flag instead.
Only the jazzer binary enables it itself, JUnit users have to pass the flag to the test JVM.
JDK 24+ warns about the memory-access methods of sun.misc.Unsafe, which would fail every fuzz target test until #1069 is fixed.
contrib_rules_jvm 0.27.0 starts them with -Djava.security.manager=allow, which JDK 24+ rejects. Newer versions don't, but break JUnit 5 tests on Windows.
rules_java doesn't provide JDK 27, so register Zulu 27 like the existing JDK 8 and 21 toolchains.
@kyakdan
kyakdan force-pushed the kyakdan-asm-java-27-support branch from d8bbc25 to 0c646c0 Compare December 1, 2026 13:28

This branch has not been deployed

No deployments
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.

Unsupported class file major version 71

1 participant