On Fri, 27 Mar 2026 14:45:54 GMT, Alan Bateman <[email protected]> wrote:
>> David Beaumont has updated the pull request with a new target base due to a >> merge or a rebase. The pull request now contains 12 commits: >> >> - Merge branch 'master' into jimage_preview_mode >> - rename jimage_exists to jimage_is_open >> - Feedback tweaks >> - Feedback tweaks >> - More feedback tweaks >> - Updated copyright >> - Feedback changes >> - Merge branch 'master' into jimage_preview_mode >> - Merge branch 'master' into jimage_preview_mode >> - undo exploded image changes for now >> - ... and 2 more: https://git.openjdk.org/jdk/compare/7695b1f9...0e802079 > > src/java.base/share/native/libjimage/jimage.cpp line 125: > >> 123: if (1 + module_name_len + preview_infix_len + 1 + name_len + 1 > >> IMAGE_MAX_PATH) { >> 124: return 0L; >> 125: } > > It would be a bug in the caller to accidentally prepend /modules or /packages > to the module name. I'm tempted to suggest this assert as it can't assert in > the caller (at least not without an error code parameter, or having some > non-0 values reserved for errors). > > I can't think of how it would be possible to map a package name to the name > of a module in the image but that name be larger than what is possible. So > maybe that should assert too. This is where I simply don't know enough about how the C++ API is used to know for sure if it could get such a value. If this is used for something like "Class.forName()" this it would be possible to construct something. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/29414#discussion_r3008607398
