changeset 2649:3c07ff843d55 icedtea-3.17.0pre02

Merge jdk8u272-b04
author Andrew John Hughes <gnu_andrew@member.fsf.org>
date Sat, 24 Oct 2020 01:11:51 +0100
parents 64ff8f8e38d2 (current diff) d90c85ae0004 (diff)
children fc87bc126e85
files .hgtags
diffstat 4 files changed, 73 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/.hgtags	Fri Sep 04 17:46:09 2020 +0100
+++ b/.hgtags	Sat Oct 24 01:11:51 2020 +0100
@@ -1145,7 +1145,16 @@
 0b39fe441888452aa6a7aabef856c23e8cabf9ff jdk8u262-b03
 eef87c0da03ebb76368edb3195c1c5924edda265 jdk8u262-b04
 e2a7c53cfa4d3c689bb819cf7ed6bb766a62baa9 jdk8u262-b05
+e2a7c53cfa4d3c689bb819cf7ed6bb766a62baa9 jdk8u272-b00
 f6630163b3a2b7a136db8b78049f78aa491aaf69 jdk8u262-b06
 e085d9bd4f6596c5633359d16d9bfc39ecfb1b72 jdk8u262-b07
 18103a6d9d495506b71068e6886d436f98bb165c jdk8u262-b08
 7348b67e1dd4786e9cd4c0472ca2802f36a2573f jdk8u262-b09
+15fcd98e96ac6bd631816fc78c3fa271f164ca6c jdk8u262-b10
+15fcd98e96ac6bd631816fc78c3fa271f164ca6c jdk8u262-ga
+15fcd98e96ac6bd631816fc78c3fa271f164ca6c jdk8u265-b00
+124d863b2b5d0496d3f626f3426652871c950909 jdk8u265-b01
+124d863b2b5d0496d3f626f3426652871c950909 jdk8u265-ga
+ab242949177cbfcd698b3c9792d308f32ebec67f jdk8u272-b01
+cf78b728ecca3ddd206a7bdbd9deb74eca80cf40 jdk8u272-b02
+1409bb48eea8631fffab1a9d2903cf9f68aeb124 jdk8u272-b03
--- a/THIRD_PARTY_README	Fri Sep 04 17:46:09 2020 +0100
+++ b/THIRD_PARTY_README	Sat Oct 24 01:11:51 2020 +0100
@@ -3028,8 +3028,7 @@
   Apache Commons Math 3.2
   Apache Derby 10.11.1.2
   Apache Jakarta BCEL 5.1 
-  Apache Jakarta Regexp 1.4 
-  Apache Santuario XML Security for Java 1.5.4
+  Apache Santuario XML Security for Java 2.1.1
   Apache Xalan-Java 2.7.2
   Apache Xerces Java 2.10.0 
   Apache XML Resolver 1.1 
--- a/src/jdk/nashorn/tools/Shell.java	Fri Sep 04 17:46:09 2020 +0100
+++ b/src/jdk/nashorn/tools/Shell.java	Sat Oct 24 01:11:51 2020 +0100
@@ -288,7 +288,7 @@
                 } catch (IOException ioe) {
                     // ignore
                 }
-                if (l.startsWith("#!")) {
+                if (l != null && l.startsWith("#!")) {
                     shebangFilePos = i;
                 }
                 // We're only checking the first non-option argument. If it's not a shebang file, we're in normal
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/script/nosecurity/JDK-8193137.js	Sat Oct 24 01:11:51 2020 +0100
@@ -0,0 +1,62 @@
+/*
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * JDK-8193137 : Nashorn crashes when given an empty script file.
+ *
+ * @test
+ * @option -scripting
+ * @run
+ */
+
+if (typeof fail != 'function') {
+    fail = print;
+}
+
+var System = java.lang.System;
+var File = java.io.File;
+var javahome = System.getProperty("java.home");
+var nashornJar = new File(System.getProperty("nashorn.jar"));
+if (! nashornJar.isAbsolute()) {
+    nashornJar = new File(".", nashornJar);
+}
+
+// we want to use nashorn.jar passed and not the one that comes with JRE
+var jjsCmd = javahome + "/../bin/jjs";
+jjsCmd = jjsCmd.toString().replace(/\//g, File.separator);
+if (! new File(jjsCmd).isFile()) {
+    jjsCmd = javahome + "/bin/jjs";
+    jjsCmd = jjsCmd.toString().replace(/\//g, File.separator);
+}
+
+$ENV.PWD=System.getProperty("user.dir")
+
+var emptyFile = new File($ENV.PWD+File.separator+"empty.js");
+emptyFile.createNewFile();
+emptyFile.deleteOnExit();
+
+$EXEC(jjsCmd + " empty.js");
+if($ERR != "")
+    fail("jjs fails with empty script file");