aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhannesw <unknown>2019-05-24 16:53:44 +0200
committerbell-sw <liberica@bell-sw.com>2019-10-23 16:23:20 +0300
commitcaa5408168f1b374f8b28ce10a653c1552f3bb6b (patch)
tree937089f0195bc295c2d0dfb6da31e7af3eab8ea5
parent55db8ac612b67840f484b209de0b815a112ba34a (diff)
downloadjdk8u_nashorn-caa5408168f1b374f8b28ce10a653c1552f3bb6b.tar.gz
8223518: Unexpected exception in jjs
Reviewed-by: sundar, mschoene, rhalade, jlaskey
-rw-r--r--src/jdk/nashorn/internal/runtime/regexp/JdkRegExp.java4
-rw-r--r--src/jdk/nashorn/internal/runtime/regexp/JoniRegExp.java4
2 files changed, 6 insertions, 2 deletions
diff --git a/src/jdk/nashorn/internal/runtime/regexp/JdkRegExp.java b/src/jdk/nashorn/internal/runtime/regexp/JdkRegExp.java
index 525a2a51..e8847163 100644
--- a/src/jdk/nashorn/internal/runtime/regexp/JdkRegExp.java
+++ b/src/jdk/nashorn/internal/runtime/regexp/JdkRegExp.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2019, 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
@@ -82,6 +82,8 @@ public class JdkRegExp extends RegExp {
}
} catch (final PatternSyntaxException e2) {
throwParserException("syntax", e2.getMessage());
+ } catch (StackOverflowError e3) {
+ throw new RuntimeException(e3);
}
}
diff --git a/src/jdk/nashorn/internal/runtime/regexp/JoniRegExp.java b/src/jdk/nashorn/internal/runtime/regexp/JoniRegExp.java
index a6023389..ccddc876 100644
--- a/src/jdk/nashorn/internal/runtime/regexp/JoniRegExp.java
+++ b/src/jdk/nashorn/internal/runtime/regexp/JoniRegExp.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2019, 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
@@ -82,6 +82,8 @@ public class JoniRegExp extends RegExp {
}
} catch (final PatternSyntaxException | JOniException e2) {
throwParserException("syntax", e2.getMessage());
+ } catch (StackOverflowError e3) {
+ throw new RuntimeException(e3);
}
}