On Tue, 20 Aug 2024 15:08:23 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
>
> Adam Sotona has updated the pull request with a new target base due to a 
> merge or a rebase. The incremental webrev excludes the unrelated changes 
> brought in by the merge/rebase. The pull request contains three additional 
> commits since the last revision:
> 
>  - Merge remote-tracking branch 'openjdk/master' into 
> JDK-8338661-stack-counter
>    
>    # Conflicts:
>    #  test/jdk/jdk/classfile/StackMapsTest.java
>  - 8338661: StackMapTable is invalid if frames appear in dead code
>  - 8338623: StackCounter adding extraneous slots for receiver invoke 
> instructions

Marked as reviewed by liach (Reviewer).

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

PR Review: https://git.openjdk.org/jdk/pull/20644#pullrequestreview-2248315940

Reply via email to