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

delete on global object not properly guarded

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 8u20
    • 8
    • core-libs
    • b09
    • generic
    • generic

        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();

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

                Created:
                Updated:
                Resolved: