RFR: 8341277: Validate slot argument for instruction factories
Adam Sotona
asotona at openjdk.org
Tue Oct 1 11:57:34 UTC 2024
On Mon, 30 Sep 2024 23:36:35 GMT, Chen Liang <liach at openjdk.org> wrote:
> Perform validation of local variable slots, multinewarray dimension, iinc value and specify these validations are performed. Specify these exception behaviors for sipush and bipush as well.
>
> This validation avoids using invalid values that will be lost once class files are written, and avoids invalid value pollution from upstream in chained transformations.
>
> This changes the exception specs of Class-File API, but does not block the JEP as it does not change the intended functionality of these APIs.
>
> Unfortunately, I cannot test the DirectCodeBuilder overloads due to it failing to generate stack maps, so the tests are restricted to instruction factories.
Looks good to me.
-------------
Marked as reviewed by asotona (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/21275#pullrequestreview-2339982638
More information about the core-libs-dev
mailing list