Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8041622

InetAddress.getByName incorrectly parses "4294967296"

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P3 P3
    • None
    • 9
    • core-libs
    • generic
    • os_x, solaris

      This is from test "java/net/Inet4Address/textToNumericFormat.java"

      It was expected to throw UnknownHostException for "4294967296" in following sentence.
      InetAddress ia = InetAddress.getByName(badAddrs[i]);

      But it is unexpectedly parsed on Mac and Solaris(both sparc and X86). Tested with the same build on Windows 32 bit, and it passed.

      Log:
      java.lang.RuntimeException: Bad Address parsed: [4294967296]
      at textToNumericFormat.main(textToNumericFormat.java:85)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:484)
      at com.sun.javatest.regtest.MainAction$SameVMRunnable.run(MainAction.java:754)
      at java.lang.Thread.run(Thread.java:745)



            Unassigned Unassigned
            xiaofeya Xiaofeng Yang
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: