RFR: 8281748: runtime/logging/RedefineClasses.java failed "assert(addr != __null) failed: invariant"
Albert Mingkun Yang
ayang at openjdk.java.net
Tue Feb 15 14:10:06 UTC 2022
On Tue, 15 Feb 2022 11:45:00 GMT, Stefan Johansson <sjohanss 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.
-------------
Marked as reviewed by ayang (Reviewer).
PR: https://git.openjdk.java.net/jdk/pull/7476
More information about the hotspot-gc-dev
mailing list