On Thu, 18 Jul 2024 16:23:44 GMT, Adam Sotona <asot...@openjdk.org> wrote:
> `ClassFile.verify()` should always return list of verification errors and > never throw an exception, even for corrupted classes. > `BoundAttribute` initializations of `LocalVariableTable` and > `LocalVariableTypeTable` attributes do not expect invalid possible locations > and cause `ClassCastException`. > > This patch fixes `BoundAttribute` to throw `IllegalArgumentException` for > invalid `LocalVariableTable` and `LocalVariableTypeTable` attributes > locations. And makes `VerifierImpl` a bit more resilient to exceptions thrown > from the verifier initialization. > > Relevant test is added. > > Please review. > > Thanks, > Adam This pull request has now been integrated. Changeset: c25c4896 Author: Adam Sotona <asot...@openjdk.org> URL: https://git.openjdk.org/jdk/commit/c25c4896ad9ef031e3cddec493aef66ff87c48a7 Stats: 44 lines in 4 files changed: 37 ins; 0 del; 7 mod 8333812: ClassFile.verify() can throw exceptions instead of returning VerifyErrors Reviewed-by: liach ------------- PR: https://git.openjdk.org/jdk/pull/20241