[jdk8u-dev] Integrated: 8058322: Zero name_index item of MethodParameters attribute cause MalformedParameterException.
Chen Liang
liach at openjdk.org
Thu Oct 24 17:03:12 UTC 2024
On Tue, 8 Oct 2024 17:11:01 GMT, Chen Liang <liach at openjdk.org> wrote:
> An out-of-spec behavior of core reflection causes it to fail when it encounters class files that conform to JVMS for release 8. In [JVMS § 4.7.24](https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-4.html#jvms-4.7.24) parameters are allowed to have `null` (CP reference 0) names, but core reflection didn't accept it.
>
> This problem was relatively obscure, but it has been exacerbated when javac for release 21 and later starts generating such parameters in `MethodParameters` attribute. Since this is a problem with Java 8, I propose to backport this related fix onto 8 instead of changing latest releases.
>
> This pull request contains a backport of commit [cba5bd26](https://github.com/openjdk/jdk/commit/cba5bd26387dc2ecb31ac8d6bea21bcc01da0cd5) from the [openjdk/jdk](https://git.openjdk.org/jdk) repository. The commit being backported was authored by Eric McCorkle on 11 Nov 2014 and was reviewed by Coleen Phillimore and David Holmes.
>
> A backport request is included in the latest comment in the original JBS issue.
>
> An original pull request openjdk/jdk8u#63 was made against the wrong repository.
This pull request has now been integrated.
Changeset: b6616d68
Author: Chen Liang <liach at openjdk.org>
Committer: Severin Gehwolf <sgehwolf at openjdk.org>
URL: https://git.openjdk.org/jdk8u-dev/commit/b6616d688fd8acd9cf141ee82f53de7ac90a262d
Stats: 8 lines in 1 file changed: 2 ins; 3 del; 3 mod
8058322: Zero name_index item of MethodParameters attribute cause MalformedParameterException.
Allow hotspot to report null for 0 parameter_name index in MethodParameters attribute
Backport-of: cba5bd26387dc2ecb31ac8d6bea21bcc01da0cd5
-------------
PR: https://git.openjdk.org/jdk8u-dev/pull/592
More information about the jdk8u-dev
mailing list