RFR: 8361363: ShenandoahAsserts::print_obj() does not work for forwarded objects and UseCompactObjectHeaders
Thomas Stuefe
stuefe at openjdk.org
Tue Jul 8 13:48:40 UTC 2025
On Tue, 8 Jul 2025 13:25:40 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:
> You know what, this is fine as it is.
>
> The whole business with `ShenandoahForwarding::klass` is super-duper-awkward, and verifier already touches the forwardees using that method in places where it really should not. It needs a more comprehensive fix for `+UCOH`.
>
> It is a mess, but not your mess. So integrate this one, we will figure out `ShenandoahForwarding::klass` after this.
I had a similar thought while working on https://bugs.openjdk.org/browse/JDK-8361342 . `ShenandoahForwarding::klass` resolves the narrow Klass pointer, which may already assert if that one is null or invalid. I mentally left it for a rainy friday afternoon to fix.
And yes, printing the raw header (and possibly the first few payload words, to get a bit of the first members) I found very useful. os::print_hex_dump will tiptoe around invalid memory, so that should be fine to do.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/26117#issuecomment-3049039918
More information about the shenandoah-dev
mailing list