Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8024971 Fuzzing results on nashorn by Andre
  3. JDK-8047371

function f(){ var a=1; with({ get a() { return false } }) return a }; f() throws TypeError with optimistic compilation

    XMLWordPrintable

    Details

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

      Backports

        Description

        jjs -J-Djava.ext.dirs=$jdk9-dev/nashorn/dist

        jjs> function f(){var a=1; with({get a(){return false}}) return a}; f()
        <shell>:1 TypeError: Cannot set property "a" of [object Object] that has only a getter

        With optimistic types switched off, evaluates to (expected) false value.

        jjs -J-Djava.ext.dirs=$jdk9-dev/nashorn/dist --optimistic-types=false
        jjs> function f(){var a=1; with({get a(){return false}}) return a}; f()
        false


          Attachments

            Issue Links

              Activity

                People

                Assignee:
                attila Attila Szegedi
                Reporter:
                sundar Sundararajan Athijegannathan
                Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved: