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

OutOfMemoryError with large numeric keys in JSON.parse

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 9
    • Component/s: core-libs
    • Subcomponent:
    • Resolved In Build:
      b85
    • CPU:
      generic
    • OS:
      generic

      Backports

        Description

        Parsing JSON with lots of large numeric keys can throw an OOM.

        http://stackoverflow.com/questions/32787100/nashorn-json-parse-java-lang-outofmemoryerror-java-heap-space-jdk8u60

        The problem is that we don' switch to sparse array data soon enough. The current threshold (defined in SparseArrayData.MAX_DENSE_LENGTH) is 8 * 1024 * 1024.

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                hannesw Hannes Wallnoefer
                Reporter:
                hannesw Hannes Wallnoefer
                Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved: