RFR: 8281748: runtime/logging/RedefineClasses.java failed "assert(addr != __null) failed: invariant"
Stefan Johansson
sjohanss at openjdk.java.net
Tue Feb 15 16:26:06 UTC 2022
On Tue, 15 Feb 2022 14:06:30 GMT, Albert Mingkun Yang <ayang at openjdk.org> wrote:
>> Please review this fix for [JDK-8281748](https://bugs.openjdk.java.net/browse/JDK-8281748).
>>
>> **Summary**
>> In a recent [cleanup](https://bugs.openjdk.java.net/browse/JDK-8281637) a NULL-check in `G1CMIsAliveClosure::do_object_b(oop obj)` was forgotten. This was not caught by the initial testing because the only time the check is needed is when a referent is cleared **during** reference discovery, which is quite hard to trigger.
>>
>> The fix is fairly simple, but returning `true` when a `NULL` is passed in feels a bit counter-intuitive. This behavior is the same as prior to the cleanup causing the error and reading the code this will lead to not discovering references where the referent is `NULL`.
>>
>> **Testing**
>>
>> - [ ] Re-running mach5 tier1-5
>
> Approved since it fixes CI failure and it's equivalent to what we had on master. However, I believe `G1CMIsAliveClosure::do_object_b` should not accept `null` as its input. Taking `ReferenceProcessor::process_discovered_list_work` as an example, `null` referents are filtered out before asking if a referent is live. Therefore, IMO, the proper fix should be to check `null` before calling this closure.
Thanks @albertnetymk and @kimbarrett for the reviews.
-------------
PR: https://git.openjdk.java.net/jdk/pull/7476
More information about the hotspot-gc-dev
mailing list