From 6ff0428203e1254b31f1fd3d89a25753e3629548 Mon Sep 17 00:00:00 2001 From: mazhen Date: Mon, 9 Jun 2025 02:11:17 +0000 Subject: [PATCH 1/2] 8303612: runtime/StackGuardPages/TestStackGuardPagesNative.java fails with exit code 139 replace infinite loop with conditional in do_overflow function --- test/hotspot/jtreg/ProblemList.txt | 1 - test/hotspot/jtreg/runtime/StackGuardPages/exeinvoke.c | 10 ++++------ 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/test/hotspot/jtreg/ProblemList.txt b/test/hotspot/jtreg/ProblemList.txt index f0e50e58b2bfa..117bef06960ef 100644 --- a/test/hotspot/jtreg/ProblemList.txt +++ b/test/hotspot/jtreg/ProblemList.txt @@ -108,7 +108,6 @@ runtime/os/TestTracePageSizes.java#compiler-options 8267460 linux-aarch64 runtime/os/TestTracePageSizes.java#G1 8267460 linux-aarch64 runtime/os/TestTracePageSizes.java#Parallel 8267460 linux-aarch64 runtime/os/TestTracePageSizes.java#Serial 8267460 linux-aarch64 -runtime/StackGuardPages/TestStackGuardPagesNative.java 8303612 linux-all runtime/ErrorHandling/MachCodeFramesInErrorFile.java 8313315 linux-ppc64le runtime/NMT/VirtualAllocCommitMerge.java 8309698 linux-s390x diff --git a/test/hotspot/jtreg/runtime/StackGuardPages/exeinvoke.c b/test/hotspot/jtreg/runtime/StackGuardPages/exeinvoke.c index abef2ea050a72..6316e39e41065 100644 --- a/test/hotspot/jtreg/runtime/StackGuardPages/exeinvoke.c +++ b/test/hotspot/jtreg/runtime/StackGuardPages/exeinvoke.c @@ -159,12 +159,10 @@ void *run_java_overflow (void *p) { void do_overflow(){ volatile int *p = NULL; - if (_kp_rec_count == 0 || _rec_count < _kp_rec_count) { - for(;;) { - _rec_count++; - p = (int*)alloca(128); - _peek_value = p[0]; // Peek - } + while (_kp_rec_count == 0 || _rec_count < _kp_rec_count) { + _rec_count++; + p = (int*)alloca(128); + _peek_value = p[0]; // Peek } } From 01912a33b1ad4975ac334463a89c0a550aabc23f Mon Sep 17 00:00:00 2001 From: mazhen Date: Tue, 10 Jun 2025 06:08:04 +0000 Subject: [PATCH 2/2] update copyright year in StackGuardPages test - Change copyright year from 2023 to 2025 in the test file header --- test/hotspot/jtreg/runtime/StackGuardPages/exeinvoke.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/hotspot/jtreg/runtime/StackGuardPages/exeinvoke.c b/test/hotspot/jtreg/runtime/StackGuardPages/exeinvoke.c index 6316e39e41065..5982aa5b6564d 100644 --- a/test/hotspot/jtreg/runtime/StackGuardPages/exeinvoke.c +++ b/test/hotspot/jtreg/runtime/StackGuardPages/exeinvoke.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2010, 2025, 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