JDK-8034055 : delete on global object not properly guarded
  • Type: Bug
  • Component: core-libs
  • Sub-Component: jdk.nashorn
  • Affected Version: 8
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2014-02-10
  • Updated: 2014-07-29
  • Resolved: 2014-03-20
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 8 JDK 9
8u20 b09Fixed 9Fixed
Related Reports
Relates :  
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();


Comments
This will be fixed by patch for JDK-8021350.
10-03-2014