RFR: 7152948 msghdr structure not initialized properly in DatagramDispatcher
Shi Jun Zhang
zhangshj at linux.vnet.ibm.com
Mon Mar 12 02:34:05 PDT 2012
Hi nio-dev,
In jdk/src/solaris/native/sun/nio/ch/DatagramDispatcher.c, there are
some invocations of system call sendmsg/recvmsg. The second parameter of
these 2 calls is a pointer to structure msghdr. The pointer needs to be
initialized before it can be used. Currently it is initialized with
#ifdef platform clause and it is NOT initialized properly on AIX. I
think we can use memset(&m, 0, sizeof(m)) to initialized the pointer
once for all platforms.
Here is the webrev:
http://cr.openjdk.java.net/~zhangshj/7152948/webrev.00/
--
Regards,
Shi Jun Zhang
More information about the nio-dev
mailing list