8213721: [Graal] Tests vmTestbase/nsk/stress/except/except* may be encountering SEGV during out-of-memory conditions
authorjcbeyler
Wed, 21 Nov 2018 09:38:27 -0800
changeset 52640 3a7d49718852
parent 52639 fa6e4d0216a1
child 52641 09a3f379b927
child 57032 a42d0a8e0916
8213721: [Graal] Tests vmTestbase/nsk/stress/except/except* may be encountering SEGV during out-of-memory conditions Summary: Add the exception handler only for the current thread Reviewed-by: dholmes, sspitsyn, thartmann
test/hotspot/jtreg/vmTestbase/nsk/stress/except/except001.java
test/hotspot/jtreg/vmTestbase/nsk/stress/except/except002.java
test/hotspot/jtreg/vmTestbase/nsk/stress/except/except003.java
test/hotspot/jtreg/vmTestbase/nsk/stress/except/except004.java
test/hotspot/jtreg/vmTestbase/nsk/stress/except/except005.java
test/hotspot/jtreg/vmTestbase/nsk/stress/except/except006.java
test/hotspot/jtreg/vmTestbase/nsk/stress/except/except007.java
test/hotspot/jtreg/vmTestbase/nsk/stress/except/except008.java
test/hotspot/jtreg/vmTestbase/nsk/stress/except/except009.java
test/hotspot/jtreg/vmTestbase/nsk/stress/except/except010.java
test/hotspot/jtreg/vmTestbase/nsk/stress/except/except011.java
test/hotspot/jtreg/vmTestbase/nsk/stress/except/except012.java
--- a/test/hotspot/jtreg/vmTestbase/nsk/stress/except/except001.java	Wed Nov 21 08:16:25 2018 -0800
+++ b/test/hotspot/jtreg/vmTestbase/nsk/stress/except/except001.java	Wed Nov 21 09:38:27 2018 -0800
@@ -262,7 +262,7 @@
      * @see #run(String[], PrintStream)
      */
     public static void main(String args[]) {
-        Thread.setDefaultUncaughtExceptionHandler(new Thread.UncaughtExceptionHandler() {
+        Thread.currentThread().setUncaughtExceptionHandler(new Thread.UncaughtExceptionHandler() {
             // Last try. If there is some exception outside the code, test should end correctly
             @Override
             public void uncaughtException(Thread t, Throwable e) {
--- a/test/hotspot/jtreg/vmTestbase/nsk/stress/except/except002.java	Wed Nov 21 08:16:25 2018 -0800
+++ b/test/hotspot/jtreg/vmTestbase/nsk/stress/except/except002.java	Wed Nov 21 09:38:27 2018 -0800
@@ -257,7 +257,7 @@
      * @see #run(String[], PrintStream)
      */
     public static void main(String args[]) {
-        Thread.setDefaultUncaughtExceptionHandler(new Thread.UncaughtExceptionHandler() {
+        Thread.currentThread().setUncaughtExceptionHandler(new Thread.UncaughtExceptionHandler() {
             // Last try. If there is some exception outside the code, test should end correctly
             @Override
             public void uncaughtException(Thread t, Throwable e) {
--- a/test/hotspot/jtreg/vmTestbase/nsk/stress/except/except003.java	Wed Nov 21 08:16:25 2018 -0800
+++ b/test/hotspot/jtreg/vmTestbase/nsk/stress/except/except003.java	Wed Nov 21 09:38:27 2018 -0800
@@ -258,7 +258,7 @@
      * @see #run(String[], PrintStream)
      */
     public static void main(String args[]) {
-        Thread.setDefaultUncaughtExceptionHandler(new Thread.UncaughtExceptionHandler() {
+        Thread.currentThread().setUncaughtExceptionHandler(new Thread.UncaughtExceptionHandler() {
             // Last try. If there is some exception outside the code, test should end correctly
             @Override
             public void uncaughtException(Thread t, Throwable e) {
--- a/test/hotspot/jtreg/vmTestbase/nsk/stress/except/except004.java	Wed Nov 21 08:16:25 2018 -0800
+++ b/test/hotspot/jtreg/vmTestbase/nsk/stress/except/except004.java	Wed Nov 21 09:38:27 2018 -0800
@@ -476,7 +476,7 @@
      * @see #run(String[], PrintStream)
      */
     public static void main(String args[]) {
-        Thread.setDefaultUncaughtExceptionHandler(new Thread.UncaughtExceptionHandler() {
+        Thread.currentThread().setUncaughtExceptionHandler(new Thread.UncaughtExceptionHandler() {
             // Last try. If there is some exception outside the code, test should end correctly
             @Override
             public void uncaughtException(Thread t, Throwable e) {
--- a/test/hotspot/jtreg/vmTestbase/nsk/stress/except/except005.java	Wed Nov 21 08:16:25 2018 -0800
+++ b/test/hotspot/jtreg/vmTestbase/nsk/stress/except/except005.java	Wed Nov 21 09:38:27 2018 -0800
@@ -261,7 +261,7 @@
      * @see #run(String[], PrintStream)
      */
     public static void main(String args[]) {
-        Thread.setDefaultUncaughtExceptionHandler(new Thread.UncaughtExceptionHandler() {
+        Thread.currentThread().setUncaughtExceptionHandler(new Thread.UncaughtExceptionHandler() {
             // Last try. If there is some OOME, test should end correctly
             @Override
             public void uncaughtException(Thread t, Throwable e) {
--- a/test/hotspot/jtreg/vmTestbase/nsk/stress/except/except006.java	Wed Nov 21 08:16:25 2018 -0800
+++ b/test/hotspot/jtreg/vmTestbase/nsk/stress/except/except006.java	Wed Nov 21 09:38:27 2018 -0800
@@ -258,7 +258,7 @@
      * @see #run(String[], PrintStream)
      */
     public static void main(String args[]) {
-        Thread.setDefaultUncaughtExceptionHandler(new Thread.UncaughtExceptionHandler() {
+        Thread.currentThread().setUncaughtExceptionHandler(new Thread.UncaughtExceptionHandler() {
             // Last try. If there is some exception outside the code, test should end correctly
             @Override
             public void uncaughtException(Thread t, Throwable e) {
--- a/test/hotspot/jtreg/vmTestbase/nsk/stress/except/except007.java	Wed Nov 21 08:16:25 2018 -0800
+++ b/test/hotspot/jtreg/vmTestbase/nsk/stress/except/except007.java	Wed Nov 21 09:38:27 2018 -0800
@@ -350,7 +350,7 @@
      * @see #run(String[], PrintStream)
      */
     public static void main(String args[]) {
-        Thread.setDefaultUncaughtExceptionHandler(new Thread.UncaughtExceptionHandler() {
+        Thread.currentThread().setUncaughtExceptionHandler(new Thread.UncaughtExceptionHandler() {
             // Last try. If there is some exception outside the code, test should end correctly
             @Override
             public void uncaughtException(Thread t, Throwable e) {
--- a/test/hotspot/jtreg/vmTestbase/nsk/stress/except/except008.java	Wed Nov 21 08:16:25 2018 -0800
+++ b/test/hotspot/jtreg/vmTestbase/nsk/stress/except/except008.java	Wed Nov 21 09:38:27 2018 -0800
@@ -333,7 +333,7 @@
      * @see #run(String[], PrintStream)
      */
     public static void main(String args[]) {
-        Thread.setDefaultUncaughtExceptionHandler(new Thread.UncaughtExceptionHandler() {
+        Thread.currentThread().setUncaughtExceptionHandler(new Thread.UncaughtExceptionHandler() {
             // Last try. If there is some exception outside the code, test should end correctly
             @Override
             public void uncaughtException(Thread t, Throwable e) {
--- a/test/hotspot/jtreg/vmTestbase/nsk/stress/except/except009.java	Wed Nov 21 08:16:25 2018 -0800
+++ b/test/hotspot/jtreg/vmTestbase/nsk/stress/except/except009.java	Wed Nov 21 09:38:27 2018 -0800
@@ -258,7 +258,7 @@
      * @see #run(String[], PrintStream)
      */
     public static void main(String args[]) {
-        Thread.setDefaultUncaughtExceptionHandler(new Thread.UncaughtExceptionHandler() {
+        Thread.currentThread().setUncaughtExceptionHandler(new Thread.UncaughtExceptionHandler() {
             // Last try. If there is some exceprions outside the code, test should end correctly
             @Override
             public void uncaughtException(Thread t, Throwable e) {
--- a/test/hotspot/jtreg/vmTestbase/nsk/stress/except/except010.java	Wed Nov 21 08:16:25 2018 -0800
+++ b/test/hotspot/jtreg/vmTestbase/nsk/stress/except/except010.java	Wed Nov 21 09:38:27 2018 -0800
@@ -261,7 +261,7 @@
      * @see #run(String[], PrintStream)
      */
     public static void main(String args[]) {
-        Thread.setDefaultUncaughtExceptionHandler(new Thread.UncaughtExceptionHandler() {
+        Thread.currentThread().setUncaughtExceptionHandler(new Thread.UncaughtExceptionHandler() {
             // Last try. If there is some exceptions outside the code, test should end correctly
             @Override
             public void uncaughtException(Thread t, Throwable e) {
--- a/test/hotspot/jtreg/vmTestbase/nsk/stress/except/except011.java	Wed Nov 21 08:16:25 2018 -0800
+++ b/test/hotspot/jtreg/vmTestbase/nsk/stress/except/except011.java	Wed Nov 21 09:38:27 2018 -0800
@@ -266,7 +266,7 @@
      * @see #run(String[], PrintStream)
      */
     public static void main(String args[]) {
-        Thread.setDefaultUncaughtExceptionHandler(new Thread.UncaughtExceptionHandler() {
+        Thread.currentThread().setUncaughtExceptionHandler(new Thread.UncaughtExceptionHandler() {
             // Last try. If there is some OOME, test should end correctly
             @Override
             public void uncaughtException(Thread t, Throwable e) {
--- a/test/hotspot/jtreg/vmTestbase/nsk/stress/except/except012.java	Wed Nov 21 08:16:25 2018 -0800
+++ b/test/hotspot/jtreg/vmTestbase/nsk/stress/except/except012.java	Wed Nov 21 09:38:27 2018 -0800
@@ -334,7 +334,7 @@
      * @see #run(String[], PrintStream)
      */
     public static void main(String args[]) {
-        Thread.setDefaultUncaughtExceptionHandler(new Thread.UncaughtExceptionHandler() {
+        Thread.currentThread().setUncaughtExceptionHandler(new Thread.UncaughtExceptionHandler() {
             // Last try. If there is some OOME, test should end correctly
             @Override
             public void uncaughtException(Thread t, Throwable e) {