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

ArrayOutOfBounds exception while parsing PAC file

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P4
    • Resolution: Won't Fix
    • Affects Version/s: 5.0u5
    • Fix Version/s: None
    • Component/s: deploy
    • Labels:
      None

      Description

      This is radiance case 66080388.

      Sean Coffey evaluated and suggested to file a bug:

      "It looks like a bug in the JDK. Some incorrect calculation is being made which results in
      the ArrayOutOfBounds exception. I'm not sure why adding whitespace would solve the problem.
      http://cheesypoof.uk.sun.com/lxr2/source/ws/deploy/src/common/share/classes/com/sun/deploy/net/proxy/RemoveCommentReader.java?v=Java_1.5.0_12#041"

      Please refer to attachments for
      - java console output
      - problematic PAC file

      Proxy Auto-Config (PAC) file defines how web browsers and other user agents can
      automatically choose the appropriate proxy server (access method) for fetching a
       given URL. A PAC file contains a JavaScript function "FindProxyForURL(url, host
      )". This function returns a string with one or more access method specifications
      . These specifications cause the user agent to use a particular proxy server or
      to connect directly.

      Within Morgan Stanley, direct connections to the Internet are not allowed. All
      user agents requiring network access do so through the proxy layer. Only PAC ca
      n grant proxy exemptions.

      Issue
      End-users reported problems with applications that rely on Internet content and
      the JRE. Preliminary investigation showed the JRE throwing a ArrayIndexOutOfBou
      ndsException: 8192 exception while parsing the PAC file. This exception deals
      with the details of I/O processing within the JRE component. In other words, th
      e JRE component was unable to interpret the PAC file. Result was a network erro
      r: "Unable to determine proxy settings from evaluation - fallback to DIRECT". D
      irect connections are not allowed, and so the application did not work.

      We're attaching console output for breaking and working scenarios.
      We understand why things worked in Javagood.txt, and it's not because
      the "proxy file" was loaded, because we weren't using the proxy file
      (PAC) in that example, we hard coded the proxy to hqipx2-r1.ms.com in
      the JRE. It's also why I named the file "Javagood".

      The PAC is not corrupted when the JRE fails. Multiple browsers (IE, Firefox)
      are downloading and using the PAC just fine. What appears to be
      happening is that the JRE client has a buffer or alignment problem.
      Please note the JRE's error:

      java.lang.ArrayIndexOutOfBoundsException: 8192

      More importantly, the way that we were able to prevent the JRE from
      throwing the error was to literally add 8 characters of white space to
      the PAC file.
      ---------------

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                hdongorcl Hao Dong (Inactive)
                Reporter:
                lkchow Lawrence Chow
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: