RFR: 8349923: Refactor StackMapTable constructor and StackMapReader [v3]

David Holmes dholmes at openjdk.org
Thu Feb 20 03:00:57 UTC 2025


On Wed, 19 Feb 2025 14:54:31 GMT, Matias Saavedra Silva <matsaave at openjdk.org> wrote:

>> This patch refactors the `StackMapReader` to clean up the `StackMapTable` constructor. The `StackMapReader` class is extended to hold more fields used for verification purposes and allows for a simpler StackMapTable constructor. Additionally, in preparation for further changes to verification, the `_frame_count` may not be equal to the value reported by the classfile, so a new structure is used to generate the `_frame_array`. Verified with tier 1-5 tests
>
> Matias Saavedra Silva has updated the pull request incrementally with one additional commit since the last revision:
> 
>   David suggestions

src/hotspot/share/classfile/stackMapTable.cpp line 233:

> 231:   StackMapFrame* frame = next_helper(CHECK_VERIFY_(_verifier, nullptr));
> 232:   if (frame != nullptr) {
> 233:     check_offset(frame);

`check_offset` can install a verifier error, so I think you need to check for that!

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

PR Review Comment: https://git.openjdk.org/jdk/pull/23645#discussion_r1962787222


More information about the hotspot-runtime-dev mailing list