On Fri, 31 Oct 2025 14:00:38 GMT, Justin King <[email protected]> wrote:

> Check whether `osSupport::map_memory` actually succeeded in all compliation 
> modes, instead of crashing shortly after in non-debug builds. Ideally we 
> should fall back to just reading the entire file into memory manually or use 
> seek+read, but this is good enough for now to avoid crashing.

ClassLoader::setup_bootstrap_search_path_impl, and first use of 
ModuleFinder.ofSystem in early startup, attempt to stat lib/modules to 
determine if this is an images build. An images build is what jlink produces 
and always has a lib/modules file. When developers download a JDK it is an 
images build. In the JDK build itself there is an immediate "exploded" build 
but that isn't really used after the JDK is fully built. 

It would be good to exercise this code to see how VM startup behaves when 
JIMAGE_Open returns NULL. It's possible that the fastdebug build will trip on 
an assert early. For the exercise then it would be good to check both release 
and fastdebug builds.

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

PR Comment: https://git.openjdk.org/jdk/pull/28087#issuecomment-3528098276

Reply via email to