RFR: 8276241: JVM does not flag constant class entries ending in '/'
David Holmes
dholmes at openjdk.java.net
Fri Dec 3 03:37:16 UTC 2021
On Thu, 2 Dec 2021 19:22:20 GMT, Harold Seigel <hseigel at openjdk.org> wrote:
> Please review this small fix for JDK-8276241. The fix ensures that a ClassFormatError exception gets thrown for classes whose name ends in a '/' and are class file version less than 49 (JDK 1.5). (A CFE already gets thrown for newer class file versions.) The regression test class was written using a byte array because neither jcod nor jasm could handle a class name ending in '/'.
>
> The fix was tested by running JCK lang and VM tests on Linux x64, Mach5 tiers 1-2 on Linux, Mac OS, and Windows, and Mach5 tiers 3-5 on Linux x64.
>
> Thanks, Harold
Hi Harold,
Fix seems fine, but this kind of change needs a CSR request.
I can't imagine how one might use a class with a name ending in slash, but this is an incompatible change that affects really old classfiles.
Thanks,
David
-------------
Marked as reviewed by dholmes (Reviewer).
PR: https://git.openjdk.java.net/jdk/pull/6678
More information about the hotspot-runtime-dev
mailing list