[jdk19] RFR: 8289148: j.l.foreign.VaList::nextVarg call could throw IndexOutOfBoundsException or even crash the VM [v3]

Maurizio Cimadamore mcimadamore at openjdk.org
Tue Jul 5 20:53:58 UTC 2022


On Tue, 5 Jul 2022 17:27:34 GMT, Jorn Vernee <jvernee at openjdk.org> wrote:

>> This patch changes all VaList implementations to throw `NoSuchElementException` when out of bounds reads occur on a VaList that is created using the Java builder API. The docs are updated accordingly.
>> 
>> For VaLists that are created from native addresses, we don't know their bounds, so we can not throw exceptions in that case.
>> 
>> Testing: `jdk_foreign` test suite on all platforms that implement VaList.
>
> Jorn Vernee has updated the pull request incrementally with one additional commit since the last revision:
> 
>   hmtl -> html

Looks good!

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

Marked as reviewed by mcimadamore (Reviewer).

PR: https://git.openjdk.org/jdk19/pull/91


More information about the core-libs-dev mailing list