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

delete on global object not properly guarded

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P4
    • 8u20
    • 8
    • core-libs
    • b09
    • generic
    • 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

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

                Dates

                  Created:
                  Updated:
                  Resolved: