RFR: 8374343: Fix SIGSEGV when lib/modules is unreadable [v2]

Ioi Lam iklam at openjdk.org
Sat Jan 24 03:55:57 UTC 2026


On Fri, 23 Jan 2026 17:21:48 GMT, Boris Ulasevich <bulasevich at openjdk.org> wrote:

>> The JVM crashes with a SIGSEGV during startup if the runtime image (lib/modules) exists but is unreadable. In this scenario, ClassLoader::get_jrt_entry() returns nullptr, leading to a crash. This change adds a null check to avoid the dereference and bail out gracefully.
>
> Boris Ulasevich has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Move runtime image check to early VM init
>   
>   Suggested-by: Ioi Lam

LGTM.

I think it's not necessary to include a test case. We generally don't test for corruption of the JDK installation itself.

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

Marked as reviewed by iklam (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/28982#pullrequestreview-3700569688


More information about the hotspot-runtime-dev mailing list