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

Random failures when script size exceeds token limits

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 9
    • 9
    • core-libs
    • b94
    • generic
    • generic

      There is a regression when running JDK-8029952 in JDK9. A TypeError is thrown during the on-demand parsing of the main script function. The reason is that the length of the script exceeds the 24 bits available in the function token. We currently encode tokens into a long where 8 bits are used for the token type, 24 bits for the token length, and the remaining 32 bits for the token position.

      The suggested fix is to use 28 bits for both token position and length, given that they can both get roughly the size of the source code. 2^28 (roughly 260 MB) should still be enough for code size.

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

              Created:
              Updated:
              Resolved: