On Thu, 13 Jun 2024 17:50:38 GMT, Chen Liang <li...@openjdk.org> wrote:

> Currently, javap crashes for class files that have set non-zero values for 
> undefined access flag bits, as 
> `java.lang.reflect.AccessFlag.maskToAccessFlag` and 
> `java.lang.classfile.AccessFlags.flags` fail. In contrast, the JVMS, though 
> asking for these bits to be set to 0, requires VM to proceed and ignore these 
> bits. javap should emulate the VM behavior and proceed rendering, ignoring 
> these undefined bits.
> 
> In addition, a few bytecode generation utilities in the JDK set unused bits, 
> such as in 
> `java.lang.invoke.MethodHandleImpl.BindCaller#generateInvokerTemplate` and 
> `java.lang.invoke.GenerateJLIClassesHelper#generateCodeBytesForLFs`. Those 
> can be updated in a later cleanup.

This pull request has now been integrated.

Changeset: 7e55ed3b
Author:    Chen Liang <li...@openjdk.org>
URL:       
https://git.openjdk.org/jdk/commit/7e55ed3b106ed08956d2d38b7c99fb81704667c9
Stats:     228 lines in 4 files changed: 168 ins; 44 del; 16 mod

8333748: javap crash - Fatal error: Unmatched bit position 0x2 for location 
CLASS

Reviewed-by: asotona

-------------

PR: https://git.openjdk.org/jdk/pull/19708

Reply via email to