Integrated: 8341020: Error handler crashes when Metaspace is not fully initialized

Aleksey Shipilev shade at openjdk.org
Fri Oct 18 05:59:18 UTC 2024


On Thu, 26 Sep 2024 11:44:44 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

This pull request has now been integrated.

Changeset: 7f4ed500
Author:    Aleksey Shipilev <shade at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/7f4ed5001efac28f02fbbb78893051e28cc33e80
Stats:     1 line in 1 file changed: 0 ins; 0 del; 1 mod

8341020: Error handler crashes when Metaspace is not fully initialized

Reviewed-by: kbarrett, jsjolen, stefank, dholmes

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

PR: https://git.openjdk.org/jdk/pull/21206


More information about the hotspot-runtime-dev mailing list