Integrated: 8308549: Classfile API should fail to generate over-sized Code attribute
Adam Sotona
asotona at openjdk.org
Thu May 25 07:17:07 UTC 2023
On Tue, 23 May 2023 12:54:20 GMT, Adam Sotona <asotona at openjdk.org> wrote:
> Classfile API allowed to generate Code attribute exceeding the 65k limit. No exception has been thrown during class generation and the class failed verification later during class loading.
> This patch adds Code size limit check throwing IllegalArgumentException.
> The patch also adds similar check for constant pool size limit to avoid generation class file with corrupted constant pool.
> Two new tests are added to check response on oversized Code attribute and constant pool.
> `VerifierImpl` is extended to check Code attribute size as a part of class verification process.
>
> Please review.
>
> Thanks,
> Adam
This pull request has now been integrated.
Changeset: bfcae68e
Author: Adam Sotona <asotona at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/bfcae68ed10e4330c35f5de0bdb2d31e44e2872e
Stats: 50 lines in 6 files changed: 45 ins; 0 del; 5 mod
8308549: Classfile API should fail to generate over-sized Code attribute
Reviewed-by: mchung
-------------
PR: https://git.openjdk.org/jdk/pull/14100
More information about the core-libs-dev
mailing list