RFR: 8255598: [PPC64] assert(Universe::heap()->is_in(result)) failed: object not in heap [v2]

Martin Doerr mdoerr at openjdk.java.net
Thu Nov 5 22:33:58 UTC 2020


On Thu, 5 Nov 2020 18:36:16 GMT, Albert Mingkun Yang <ayang at openjdk.org> wrote:

>> Martin Doerr has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   add comment and use CompressedOops::is_null
>
> Given the following naming pair, I would have guess that `decode_raw` can handle null properly, so the explicit check of null in this PR struck me as a surprise. Why so?
> 
>   static inline oop decode_raw_not_null(narrowOop v);
>   static inline oop decode_raw(narrowOop v);
> 
> I think having some concise inline comments to explain why `decode_raw` is used over `decode` could improve readability.

@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.

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

PR: https://git.openjdk.java.net/jdk/pull/1078



More information about the hotspot-gc-dev mailing list