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
--- 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) {