A behavior difference about reachable test for address zero

2011-11-22 Thread Sean Chou
Hi all,

I found a behavior difference when running the testcase PingZero on
linux and windows.
On Linux, it prints "reachable" while on windows "unreachable", which is
the same with
the result of running "ping 0.0.0.0" on these two platforms.

Is it a bug or intended?

PingZero.java :

//
import java.net.*;

class PingZero {
public static void main(String args[]) {
try {
InetAddress inetAddress = InetAddress.getByAddress(new byte[] {
0,
0, 0, 0 });
boolean b = inetAddress.isReachable((int) (1.0 * 3000));
if (b) {
System.out.println(" 0.0.0.0 is reachable ! ");
} else {
System.out.println(" 0.0.0.0 is not reachable ! ");
}
} catch (Exception e) {
e.printStackTrace();
}
}
}

//

-- 
Best Regards,
Sean Chou


PingZero.java
Description: Binary data


hg: jdk8/tl/jdk: 7112670: Inet4AddressImpl should use getaddrinfo/getnameinfo

2011-11-22 Thread neil . richards
Changeset: 81987765cb81
Author:ngmr
Date:  2011-11-11 14:40 +
URL:   http://hg.openjdk.java.net/jdk8/tl/jdk/rev/81987765cb81

7112670: Inet4AddressImpl should use getaddrinfo/getnameinfo
Reviewed-by: chegar, alanb, mduigou, ngmr
Contributed-by: Charles Lee 

! src/solaris/native/java/net/Inet4AddressImpl.c
! src/solaris/native/java/net/Inet6AddressImpl.c
! src/solaris/native/java/net/net_util_md.c
! src/solaris/native/java/net/net_util_md.h



Re: Question about getaddrinfo in Inet4AddressImpl.c

2011-11-22 Thread Neil Richards
On Wed, 2011-11-16 at 20:57 +, Chris Hegarty wrote:
> Thank you Charles, and Neil.
> 
> I ran some builds and tests and all looks good to me. Thanks for fixing 
> the warnings, I know they were not caused by your changes.
> 
> Just noticed that we haven't just filed a bug for this, so I just created:
>CR 7112670: Inet4AddressImpl should use getaddrinfo/getnameinfo
> 
> Neil,
>I assume you will push this?
> 
> -Chris.
> 

Hi Chris,
Thank you for creating the bug id for this issue.

I've now pushed the change [1].

However, I've just realised I've foolishly pushed a previous version of
the change, and not the final agreed version. (aargh!)

Could you please advise me how i might best rectify this, and furnish me
with another bug id if I need one for this purpose?

Humble apologies for this :-(

Regards, Neil

[1] http://hg.openjdk.java.net/jdk8/tl/jdk/rev/81987765cb81

-- 
Unless stated above:
IBM email: neil_richards at uk.ibm.com
IBM United Kingdom Limited - Registered in England and Wales with number 741598.
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU



Re: Question about getaddrinfo in Inet4AddressImpl.c

2011-11-22 Thread Chris Hegarty

On 11/22/11 09:27 AM, Neil Richards wrote:


Hi Chris,
Thank you for creating the bug id for this issue.

I've now pushed the change [1].

However, I've just realised I've foolishly pushed a previous version of
the change, and not the final agreed version. (aargh!)


No problem. This happens from time to time.


Could you please advise me how i might best rectify this, and furnish me
with another bug id if I need one for this purpose?


Let me know the details synopsis/descriptions/etc and I'll file a new 
CR. I'm guessing its just some cleanup/style issues, right?


-Chris.



Humble apologies for this :-(

Regards, Neil

[1] http://hg.openjdk.java.net/jdk8/tl/jdk/rev/81987765cb81



Re: Question about getaddrinfo in Inet4AddressImpl.c

2011-11-22 Thread Neil Richards
On Tue, 2011-11-22 at 09:38 +, Chris Hegarty wrote:
> Let me know the details synopsis/descriptions/etc and I'll file a new 
> CR. I'm guessing its just some cleanup/style issues, right?
> 
> -Chris.

I've uploaded a webrev with the gap between the two [1].

The differences are the use of memset (rather than bzero) and NI_MAXHOST
(rather than MAXHOSTNAMELEN).

Thanks for helping me out with this,

Regards, Neil

[1] http://cr.openjdk.java.net/~ngmr/ojdk-229.1/webrev.00/

-- 
Unless stated above:
IBM email: neil_richards at uk.ibm.com
IBM United Kingdom Limited - Registered in England and Wales with number 741598.
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU



Re: code review request : JDK 7 backport: 7102369 RedirectLimit & Redirect307Test fail intermittently

2011-11-22 Thread Chris Hegarty

On 11/21/11 08:10 PM, Rob McKenna wrote:

webrev : http://cr.openjdk.java.net/~robm/7095949/webrev.00/
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7095949


Looks fine to me.

Thanks for porting this to 7u-dev. These intermittent failures are a 
real pain!


-Chris.



-Rob


Re: Question about getaddrinfo in Inet4AddressImpl.c

2011-11-22 Thread Chris Hegarty

Neil,

I filed:
CR 7114558: "Inet4AddressImpl should use memset (rather than bzero) and 
NI_MAXHOST (rather than MAXHOSTNAMELEN)"


And also reviewed your webrev. Looks fine.

-Chris.

On 11/22/11 10:00 AM, Neil Richards wrote:

On Tue, 2011-11-22 at 09:38 +, Chris Hegarty wrote:

Let me know the details synopsis/descriptions/etc and I'll file a new
CR. I'm guessing its just some cleanup/style issues, right?

-Chris.


I've uploaded a webrev with the gap between the two [1].

The differences are the use of memset (rather than bzero) and NI_MAXHOST
(rather than MAXHOSTNAMELEN).

Thanks for helping me out with this,

Regards, Neil

[1] http://cr.openjdk.java.net/~ngmr/ojdk-229.1/webrev.00/



hg: jdk8/tl/jdk: 7114558: Inet4AddressImpl should use memset (rather than bzero) and NI_MAXHOST (rather than MAXHOSTNAMELEN)

2011-11-22 Thread neil . richards
Changeset: ee2fa62fb09f
Author:ngmr
Date:  2011-11-22 09:51 +
URL:   http://hg.openjdk.java.net/jdk8/tl/jdk/rev/ee2fa62fb09f

7114558: Inet4AddressImpl should use memset (rather than bzero) and NI_MAXHOST 
(rather than MAXHOSTNAMELEN)
Reviewed-by: chegar
Contributed-by: Neil Richards 

! src/solaris/native/java/net/Inet4AddressImpl.c
! src/solaris/native/java/net/Inet6AddressImpl.c



Re: Question about getaddrinfo in Inet4AddressImpl.c

2011-11-22 Thread Neil Richards
On Tue, 2011-11-22 at 10:49 +, Chris Hegarty wrote:
> Neil,
> 
> I filed:
> CR 7114558: "Inet4AddressImpl should use memset (rather than bzero) and 
> NI_MAXHOST (rather than MAXHOSTNAMELEN)"
> 
> And also reviewed your webrev. Looks fine.
> 
> -Chris.

Hi Chris,
Thanks for reviewing this for me - I've now pushed the change up [1].

Regards, Neil

[1] http://hg.openjdk.java.net/jdk8/tl/jdk/rev/ee2fa62fb09f

-- 
Unless stated above:
IBM email: neil_richards at uk.ibm.com
IBM United Kingdom Limited - Registered in England and Wales with number 741598.
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU



Re: A behavior difference about reachable test for address zero

2011-11-22 Thread Alan Bateman

On 22/11/2011 08:40, Sean Chou wrote:


Hi all,

I found a behavior difference when running the testcase PingZero 
on linux and windows.
On Linux, it prints "reachable" while on windows "unreachable", which 
is the same with

the result of running "ping 0.0.0.0" on these two platforms.

Is it a bug or intended?


Do you get the same thing when you use the ping command?

-Alan


hg: jdk8/tl/jdk: 3 new changesets

2011-11-22 Thread sean . mullan
Changeset: 1945abeb82a0
Author:mullan
Date:  2011-11-22 08:58 -0500
URL:   http://hg.openjdk.java.net/jdk8/tl/jdk/rev/1945abeb82a0

7093090: Reduce synchronization in java.security.Policy.getPolicyNoCheck
Reviewed-by: valeriep

! src/share/classes/java/security/Policy.java

Changeset: bb8f19b80557
Author:mullan
Date:  2011-11-22 09:00 -0500
URL:   http://hg.openjdk.java.net/jdk8/tl/jdk/rev/bb8f19b80557

Merge

- test/java/io/FileDescriptor/FileChannelFDTest.java
- test/java/io/etc/FileDescriptorSharing.java

Changeset: b4d7020c2a40
Author:mullan
Date:  2011-11-22 09:17 -0500
URL:   http://hg.openjdk.java.net/jdk8/tl/jdk/rev/b4d7020c2a40

Merge