JDK-8351654 : Agent transformer bytecodes should be verified
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 25
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2025-03-11
  • Updated: 2025-04-10
  • Resolved: 2025-04-08
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 25
25 b18Fixed
Related Reports
Relates :  
Sub Tasks
JDK-8353291 :  
Description
By default if the ClassFileLoadHook bytecodes are for the boot loader, they're not verified so incorrect bytecodes may be loaded. If redefinition is used, then they're verified which leads to confusion.  See email thread and reproducer.

https://mail.openjdk.org/pipermail/hotspot-dev/2025-March/102461.html

https://github.com/rjernst/verify-error-repro
Comments
Changeset: 250437e5 Branch: master Author: Coleen Phillimore <coleenp@openjdk.org> Date: 2025-04-08 13:12:28 +0000 URL: https://git.openjdk.org/jdk/commit/250437e557c56ba66a74ab759cfd1071a510e184
08-04-2025

A pull request was submitted for review. Branch: master URL: https://git.openjdk.org/jdk/pull/24333 Date: 2025-03-31 16:31:47 +0000
31-03-2025

This bug affects all JDK versions, but this should be thought of as more of an enhancement, so should not be backported. Except maybe to JDK 24, since that release verifies class files provided through RedefineClasses.
31-03-2025