RFR: 8340012: [C2] assert(KlassEncodingMetaspaceMax > pd) failed: change encoding max if new encoding after 8338526 [v2]
Thomas Stuefe
stuefe at openjdk.org
Fri Sep 13 15:43:21 UTC 2024
On Fri, 13 Sep 2024 15:40:56 GMT, Martin Doerr <mdoerr at openjdk.org> wrote:
>> After JDK-8338526, the transformation can only be done if the Klass* is in the encoding range (also see JBS issue for more details). I've also enhanced the assertion message.
>
> Martin Doerr has updated the pull request incrementally with one additional commit since the last revision:
>
> Add sanity check.
Good catch. I was afraid we would hit things like this. I hope there are not more.
src/hotspot/share/oops/compressedKlass.inline.hpp line 54:
> 52: assert(check_alignment(v), "Address not aligned");
> 53: uint64_t pd = (uint64_t)(pointer_delta(v, narrow_base, 1));
> 54: assert(KlassEncodingMetaspaceMax > pd, "change encoding max if new encoding (Klass " PTR_FORMAT ", Base " PTR_FORMAT ")", p2i(v), p2i(narrow_base));
Would it be possible to leave this hunk out? I am in the process of rewriting large parts of this for Lilliput, so it won't survive in this current form. These things will be a lot better tested, and the assertion messages make more sense, too)
-------------
PR Review: https://git.openjdk.org/jdk/pull/20971#pullrequestreview-2303454203
PR Review Comment: https://git.openjdk.org/jdk/pull/20971#discussion_r1759082597
More information about the hotspot-dev
mailing list