JDK-8074465 : Nashorn - finally clause executed twice
  • Type: Bug
  • Component: core-libs
  • Sub-Component: jdk.nashorn
  • Affected Version: 8u31,8u40
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: windows_8
  • CPU: x86
  • Submitted: 2015-02-28
  • Updated: 2015-07-01
  • Resolved: 2015-03-10
Related Reports
Duplicate :  
Description
FULL PRODUCT VERSION :
java version "1.8.0_31"
Java(TM) SE Runtime Environment (build 1.8.0_31-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.31-b07, mixed mode)

ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows [Version 6.3.9600]

EXTRA RELEVANT SYSTEM CONFIGURATION :
Output of "jjs -version":
nashorn 1.8.0_31

A DESCRIPTION OF THE PROBLEM :
In Nashorn, the "finally" clause of a try-finally statement is sometimes executed twice (cf. steps to reproduce for an example).

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
At the command line, do:
>jjs
jjs> try { for(;;) { break; } } finally { print("X"); }

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
jjs> try { for(;;) { break; } } finally { print("X"); }
X
jjs>
ACTUAL -
jjs> try { for(;;) { break; } } finally { print("X"); }
X
X
jjs>

REPRODUCIBILITY :
This bug can be reproduced always.


Comments
Closing this as duplicate of JDK-8030198 which has resolved fix for JDK 9 based upon positive conformation from the submitter: ********************************************************************************************************* On 3/7/2015 1:50 AM, .............. wrote: > Hi ......... > > I can confirm that this issue is not reproducible with the latest builds. Below are the builds I used to check: > > java -version > java version "1.9.0-ea" > Java(TM) SE Runtime Environment (build 1.9.0-ea-b53) > Java HotSpot(TM) 64-Bit Server VM (build 1.9.0-ea-b53, mixed mode) > > java -version > java version "1.8.0_60-ea" > Java(TM) SE Runtime Environment (build 1.8.0_60-ea-b05) > Java HotSpot(TM) 64-Bit Server VM (build 25.60-b05, mixed mode) > > Thank you, > .......... ***********************************************************************************************************************
10-03-2015

This is a duplicate of JDK-8030198. I have asked the submitter to confirm this with JDK 8u60 ea and 9 ea builds. --------------------------------------------------------------------------------------------------------------------------------------------------------------- On 3/5/2015 12:16 PM, .......... wrote: > Hi ........, > > This issue is likely fixed with JDK 9 and JDK 8u60. Can you please check with the latest builds and confirm back with the outcome. > You can download the latest ea builds from: > https://jdk8.java.net/download.html > https://jdk9.java.net/download/ > > Thank You, > ............. ------------------------------------------------------------------------------------------------------------------------------------------------------------------
05-03-2015

Moved to core-libs/jdk.nashorn category.
05-03-2015

Please move nashorn bugs to core-libs/jdk.nashorn category - javax.script category is only for javax.script / jsr-223 specification, doc issues there. -Sundar
05-03-2015

Checked this for JDK 7u76, 8u31, 8u40, 8u60 ea b04, and 9 ea b50 and here is the outcome: 7u76 - FAIL 8u31 - FAIL 8u40 - FAIL 8u60 b04 - OK 9 ea b50 - OK The issue is reproducible iwth 7u76, 8u31, and 8u40: jjs> try { for(;;) { break; } } finally { print("X"); } X X
05-03-2015