On Wed, 29 Jun 2022 13:40:01 GMT, Jorn Vernee <[email protected]> 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. This pull request has now been integrated. Changeset: 3164c98f Author: Jorn Vernee <[email protected]> URL: https://git.openjdk.org/jdk19/commit/3164c98f4c02a48cad62dd4f9b6cc55d64ac6d83 Stats: 394 lines in 7 files changed: 237 ins; 19 del; 138 mod 8289148: j.l.foreign.VaList::nextVarg call could throw IndexOutOfBoundsException or even crash the VM 8289333: Specification of method j.l.foreign.VaList::skip deserves clarification 8289156: j.l.foreign.VaList::skip call could throw java.lang.IndexOutOfBoundsException: Out of bound access on segment Reviewed-by: mcimadamore ------------- PR: https://git.openjdk.org/jdk19/pull/91
