RFR: 8338626: ClassLoaderExt::process_jar_manifest() should allow / separator on Windows [v4]
Calvin Cheung
ccheung at openjdk.org
Fri Sep 13 17:09:11 UTC 2024
On Fri, 13 Sep 2024 08:13:31 GMT, Alan Bateman <alanb at openjdk.org> wrote:
>> Alan, could you show us some cases where ClassLoaderExt::process_jar_manifest() will fail. IIUC, the failures won't be Windows-specific (i.e., orthogonal to the \ vs / issues in this bug) but rather will happen on all platforms.
>
> Can you try examples like `file:lib.jar`, `file:/d/lib.jar`, `/d/lib.jar` for starters. Once you bring Windows file paths into the picture then it's a world of hurt. There is big other topic around escaping where Class-Path is completely broken and we haven't figure out how to fix these issues in a compatibility way.
Sorry, I didn't notice last few comments until after pushing the fix. I think if there's any other shortcoming of the function in question, it should be addressed via different bug/RFE.
After a casual search for Class-Path attribute, I found: https://docs.oracle.com/javase/8/docs/technotes/guides/jar/jar.html#classpath
It says the following:
`Currently, the URLs must be relative to the code base of the JAR file for security reasons. Thus, remote optional packages will originate from the same code base as the application.`
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/20924#discussion_r1759207379
More information about the hotspot-runtime-dev
mailing list