On Tue, 20 Aug 2024 13:54:08 GMT, Adam Sotona <asot...@openjdk.org> wrote:
> ClassFile API allows to build a class with dead code and provide custom > `StackMapTable` attribute with user-specified frames covering the dead code. > `StackCounter` is responsible for calculation of `maxStack` and `maxLocals` > in certain situations and it did not include the user-provided > `StackMapTable` attribute. Dead code was skipped and `maxStack` or > `maxLocals` might became underestimated. > > This patch includes frames from user-provided `StackMapTable` attribute into > the `StackCounter` calculations. > > Please review. > > Thanks, > Adam This pull request has now been integrated. Changeset: e88a3b05 Author: Adam Sotona <asot...@openjdk.org> URL: https://git.openjdk.org/jdk/commit/e88a3b0574c0a6c6acb5faf7b67674d5b7f0797c Stats: 70 lines in 4 files changed: 61 ins; 7 del; 2 mod 8338661: StackMapTable is invalid if frames appear in dead code Reviewed-by: liach ------------- PR: https://git.openjdk.org/jdk/pull/20644