Open Col-E opened 1 year ago
Went with a different approach for hooking ZipFile handles on JDK 9+
Then I hit a wall with Inflater
natives still in some jar file handling... so to work around that I made a getInputStream
invoker. Its not the greatest solution, but it lets me focus on the actual NIO integration, as now the VM stacktrace is finally hitting something relevant:
dev/xdark/ssvm/dummy/FileToString.readReadmePath()Ljava/lang/String;
dev/xdark/ssvm/dummy/FileToString.read(Ljava/nio/file/Path;)Ljava/lang/String;
java/nio/file/Files.readAllBytes(Ljava/nio/file/Path;)[B
java/nio/file/Files.newByteChannel(Ljava/nio/file/Path;[Ljava/nio/file/OpenOption;)Ljava/nio/channels/SeekableByteChannel;
java/nio/file/Files.newByteChannel(Ljava/nio/file/Path;Ljava/util/Set;[Ljava/nio/file/attribute/FileAttribute;)Ljava/nio/channels/SeekableByteChannel;
sun/nio/fs/WindowsFileSystemProvider.newByteChannel(Ljava/nio/file/Path;Ljava/util/Set;[Ljava/nio/file/attribute/FileAttribute;)Ljava/nio/channels/SeekableByteChannel;
sun/nio/fs/WindowsChannelFactory.newFileChannel(Ljava/lang/String;Ljava/lang/String;Ljava/util/Set;J)Ljava/nio/channels/FileChannel;
sun/nio/fs/WindowsChannelFactory.open(Ljava/lang/String;Ljava/lang/String;Lsun/nio/fs/WindowsChannelFactory$Flags;J)Ljava/io/FileDescriptor;
sun/nio/fs/WindowsNativeDispatcher.CreateFile(Ljava/lang/String;IIJII)J
sun/nio/fs/WindowsNativeDispatcher.CreateFile0(JIIJII)J <--- Not yet implemented
Current failure VM trace:
The
InflaterNatives
class only handlesinitIDs
. We either need to implement those, or hook Zip files in a different way on JDK 9+