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

Incorrect @Stable usage of LambdaForm$Name.index

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 24
    • 21, 23, 24
    • core-libs

      Only zero values of stable fields are not constant-folded and can be used as the "unset" value. However, LambdaForm$Name.index uses -1 as the unset value, which can be constant-folded. The index field should store the actual arg index with an offset of 1 to leave the 0 value, and the access should all happen through the getter. Discovered in JDK-8333791.

            liach Chen Liang
            liach Chen Liang
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: