-
Bug
-
Resolution: Fixed
-
P4
-
port-stage-aarch32-8
-
None
-
aarch32
-
linux
In case of cross compilation the host generates sun.nio.fs.UnixConstants class with the native nio constants from the host machine. The value of these constants (e.g. O_NOFOLLOW) could be different on the host and target devices. It causes wrong behaviour of the NIO File functionality.
This issue is described in https://bugs.openjdk.java.net/browse/JDK-8152545 and fixed in OpenJDK9 with Jigsaw. However it is not applicable for JDK8.
This issue could be fixed by adding JNI layer to initialize sun.nio.fs.UnixConstants class on the target device:
http://cr.openjdk.java.net/~snazarki/UnixConstants.diff
This issue could be reproduced and verified with the standard JDK tests:
1) java/nio/file/Files/delete_on_close.sh
2) java/nio/file/Files/SBC.java
This issue is described in https://bugs.openjdk.java.net/browse/JDK-8152545 and fixed in OpenJDK9 with Jigsaw. However it is not applicable for JDK8.
This issue could be fixed by adding JNI layer to initialize sun.nio.fs.UnixConstants class on the target device:
http://cr.openjdk.java.net/~snazarki/UnixConstants.diff
This issue could be reproduced and verified with the standard JDK tests:
1) java/nio/file/Files/delete_on_close.sh
2) java/nio/file/Files/SBC.java