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

delete on global object not properly guarded

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 8
    • Fix Version/s: 8u20
    • Component/s: core-libs
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      b09
    • CPU:
      generic
    • OS:
      generic

      Backports

        Description

        Reported by Walter Higgins on nashorn-dev:

        http://mail.openjdk.java.net/pipermail/nashorn-dev/2014-February/002745.html

        The problem is that the global variable is configurable but callsites using it will not be properly guarded.

        Script to reproduce:

        global = this;

        function test() {
          global.self = 123;
          try {
            print(self);
          } finally {
            delete global.self;
          }
        }

        test();
        test();
        test();

          Attachments

            Issue Links

              Activity

                People

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

                  Dates

                  Created:
                  Updated:
                  Resolved: