RFR: 8341020: Error handler crashes when Metaspace is not fully initialized [v2]
Johan Sjölen
jsjolen at openjdk.org
Thu Oct 17 14:37:18 UTC 2024
On Thu, 17 Oct 2024 14:34:48 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:
>> When debugging CDS, I asked for `os::print_location` when Metaspace was not completely initialized. I suspect the same might happen if error handler fires very early in startup sequence.
>>
>> `os::print_location` got to `Metaspace::contains`, which ended up in `Metaspace::is_in_nonclass_metaspace`, which crashed, since `VirtualSpaceList` was null. Other checks in `Metaspace::contains` seem to only check the address against the boundaries, and are not affected.
>>
>> Additional testing:
>> - [x] The same debugging session did not crash the VM after the patch
>
> Aleksey Shipilev has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains three additional commits since the last revision:
>
> - Just check in error handler
> - Merge branch 'master' into JDK-8341020-metaspace-crash
> - Fix
Thanks, this looks good to me.
-------------
Marked as reviewed by jsjolen (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/21206#pullrequestreview-2375445861
More information about the hotspot-runtime-dev
mailing list