RFR: 8255598: [PPC64] assert(Universe::heap()->is_in(result)) failed: object not in heap [v2]
Martin Doerr
mdoerr at openjdk.java.net
Fri Nov 6 09:38:54 UTC 2020
On Fri, 6 Nov 2020 09:11:23 GMT, Albert Mingkun Yang <ayang at openjdk.org> wrote:
>> @albertnetymk: Thanks for looking at this. I've added a comment.
>> I was also surprised about that decode_raw doesn't handle null properly. I'd have expected decode_raw to call decode_raw_not_null, but it's implemented vice-versa. Therefore the null check before the call. Note that there's another usage with preceding null check in oopDesc::load_oop_raw.
>
>> I've added a comment.
>
> Thank you for that.
>
> I believe `decode_raw` handles null well; `decode_raw_not_null` is there just to have an extra assertion when the caller *knows* that the oop is not null.
>
>> Note that there's another usage with preceding null check in oopDesc::load_oop_raw.
>
> Indeed, but I think that one is unnecessary as well, which could (or should) be addressed in this PR or another.
Unfortunately, no.
Assume we're using "HeapBasedNarrowOop". decode_raw adds the base, so decode_raw(0) returns base which is wrong.
Also see Stefan's comment in the bug:
"I see that decode and decode_raw has different semantics w.r.t. 0, so be careful if you change this code to use decode_raw"
-------------
PR: https://git.openjdk.java.net/jdk/pull/1078
More information about the hotspot-compiler-dev
mailing list