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

    • Icon: Sub-task Sub-task
    • Resolution: Fixed
    • Icon: P3 P3
    • 9
    • 9
    • core-libs
    • None
    • b22
    • generic
    • generic

        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


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

                Created:
                Updated:
                Resolved: