Details
-
Enhancement
-
Resolution: Duplicate
-
P4
-
21
Description
JVMCI uses the os.name and os.arch system properties for configuration purposes (e.g. choosing ABI calling convention). It is protected from an app that modifies these properties via System.setProperty() as JVMCI uses jdk.internal.misc.VM.getSavedProperties(). However, it's still a problem if this property is misconfigured on the VM command line. This is shown by the java/foreign/TestFallbackLookup test which sets -Dos.name=Windows on the command line[1]. JVMCI should use jdk.internal.util.OperatingSystem and jdk.internal.util.Architecture instead.
[1] https://github.com/openjdk/jdk/blob/4460429d7a50b9a7a99058ef4e5ae36fb30b956f/test/jdk/java/foreign/TestFallbackLookup.java#L28
[1] https://github.com/openjdk/jdk/blob/4460429d7a50b9a7a99058ef4e5ae36fb30b956f/test/jdk/java/foreign/TestFallbackLookup.java#L28
Attachments
Issue Links
- duplicates
-
JDK-8309390 [JVMCI] improve copying system properties into libgraal
- Resolved