RFR: 7152948 msghdr structure not initialized properly in DatagramDispatcher
Shi Jun Zhang
zhangshj at linux.vnet.ibm.com
Tue Mar 13 21:56:27 PDT 2012
On 3/13/2012 5:05 AM, chris hegarty wrote:
> On 12/03/2012 10:42, Alan Bateman wrote:
>> ...
>> 7152948: (dc) DatagramDispatcher.c should memset msghdr to make it
>> portable to other platforms
>>
>> The changes look okay to me but I think might be a bit cleaner to do the
>> memset just prior to setting msg_iov/msg_iovlen (to keep the
>> initialization of the msghdr structure in one place).
>>
>> While you are there, can you change the value 16 to IOV_MAX? (requires
>> limits.h).
>
> Yes, this would be better. I also agree with your previous comment.
>
> I ran some builds and tests on Solaris and Linux with the current
> patch. All pass fine. I'll do the same when Shi Jun posts an updated
> patch.
>
> -Chris.
>
>>
>> -Alan
>>
>>
>>
>>
>
Thanks for the review, Alan & Chris.
Here is the new webrev:
http://cr.openjdk.java.net/~zhangshj/7152948/webrev.01/
--
Regards,
Shi Jun Zhang
More information about the nio-dev
mailing list