RFR: 8371048: ImageFileReader::open fails to check return value of osSupport::map_memory
Jaikiran Pai
jpai at openjdk.org
Tue Nov 11 06:50:04 UTC 2025
On Fri, 31 Oct 2025 14:00:38 GMT, Justin King <jcking at openjdk.org> 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.
The change looks reasonable to me. This function gets called from `ClassLoader::lookup_vm_options()` and returning `false` from here appears to be handled correctly in the hotspot classfile code.
It would be good to have Alan or Sundar review this change before integrating @AlanBateman @sundararajana.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/28087#issuecomment-3515228335
More information about the hotspot-dev
mailing list