bug-classpath
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug inetlib/44601] New: kqueue NIO: correctly handle file descriptors >


From: kbrint at rufus dot net
Subject: [Bug inetlib/44601] New: kqueue NIO: correctly handle file descriptors > 2^15
Date: 20 Jun 2010 03:18:26 -0000

In gnu_java_nio_KqueueSelectorImpl.c, the file descriptor is stored in a
temporary "short" before being put into the "struct kevent".  This truncates
all file descriptors > 2^15.

Instead, use an int.

diff --git a/native/jni/java-nio/gnu_java_nio_KqueueSelectorImpl.c
b/native/jni/java-nio/gnu_java_nio_KqueueSelectorImpl.c
index 94e6db7..fe5e2a4 100644
--- a/native/jni/java-nio/gnu_java_nio_KqueueSelectorImpl.c
+++ b/native/jni/java-nio/gnu_java_nio_KqueueSelectorImpl.c
@@ -164,7 +164,7 @@
 {
 #if defined(HAVE_KQUEUE) && defined(HAVE_KEVENT)
   struct kevent *kev;
-  short ident;
+  int ident;

   kev = (struct kevent *) (*env)->GetDirectBufferAddress (env, nstate);


-- 
           Summary: kqueue NIO: correctly handle file descriptors > 2^15
           Product: classpath
           Version: 0.98
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: inetlib
        AssignedTo: dog at gnu dot org
        ReportedBy: kbrint at rufus dot net
 GCC build triplet: x86_64-unknown-freebsd8.0
  GCC host triplet: x86_64-unknown-freebsd8.0
GCC target triplet: x86_64-unknown-freebsd8.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44601




reply via email to

[Prev in Thread] Current Thread [Next in Thread]