[jdk19] RFR: 8289148: j.l.foreign.VaList::nextVarg call could throw IndexOutOfBoundsException or even crash the VM
Jorn Vernee
jvernee at openjdk.org
Mon Jul 4 11:32:13 UTC 2022
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.
-------------
Commit messages:
- Update Javadoc
- Cleanup
- Test passing
Changes: https://git.openjdk.org/jdk19/pull/91/files
Webrev: https://webrevs.openjdk.org/?repo=jdk19&pr=91&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8289148
Stats: 392 lines in 7 files changed: 235 ins; 19 del; 138 mod
Patch: https://git.openjdk.org/jdk19/pull/91.diff
Fetch: git fetch https://git.openjdk.org/jdk19 pull/91/head:pull/91
PR: https://git.openjdk.org/jdk19/pull/91
More information about the core-libs-dev
mailing list