Skip to content

Commit

Permalink
[GR-55691] Fixed a crash in InheritedChannel.inetPeerAddress0().
Browse files Browse the repository at this point in the history
PullRequest: graal/18375
  • Loading branch information
christianhaeubl committed Jul 26, 2024
2 parents 9e1ae96 + bf74c97 commit 44cb1e0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,14 @@ class JNIRegistrationJavaNet extends JNIRegistrationUtil implements InternalFeat
public void duringSetup(DuringSetupAccess a) {
/* jdk.net.ExtendedSocketOptions is only available if the jdk.net module is loaded. */
this.hasPlatformSocketOptions = a.findClassByName("jdk.net.ExtendedSocketOptions$PlatformSocketOptions") != null;
initializeAtRunTime(a, "java.net.DatagramPacket", "java.net.InetAddress", "java.net.NetworkInterface",
initializeAtRunTime(a, "java.net.DatagramPacket", "java.net.NetworkInterface",
/*
* InetAddress would be enough ("initialized-at-runtime" is propagated to
* subclasses) but for documentation purposes we mention all subclasses
* anyway (each subclass has its own static constructor that calls native
* code).
*/
"java.net.InetAddress", "java.net.Inet4Address", "java.net.Inet6Address",
/* Stores a default SSLContext in a static field. */
"javax.net.ssl.SSLContext");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ public void duringSetup(DuringSetupAccess a) {
initializeAtRunTime(a, "sun.nio.ch.FileDispatcherImpl", "sun.nio.ch.FileChannelImpl$Unmapper");

if (isPosix()) {
initializeAtRunTime(a, "sun.nio.ch.InheritedChannel");
initializeAtRunTime(a, "sun.nio.ch.SimpleAsynchronousFileChannelImpl", "sun.nio.ch.SimpleAsynchronousFileChannelImpl$DefaultExecutorHolder",
"sun.nio.ch.SinkChannelImpl", "sun.nio.ch.SourceChannelImpl");
initializeAtRunTime(a, "sun.nio.fs.UnixNativeDispatcher", "sun.nio.ch.UnixAsynchronousServerSocketChannelImpl");
Expand Down

0 comments on commit 44cb1e0

Please sign in to comment.