From ff1c42f111c57837ed1da37bb30a50a5b4df03ff Mon Sep 17 00:00:00 2001 From: Coleen Phillimore Date: Thu, 19 Feb 2026 22:17:41 +0000 Subject: [PATCH] 8378112: Test runtime/ErrorHandling/MachCodeFramesInErrorFile.java fails with RuntimeException: 1 < 2 Reviewed-by: phubner, matsaave --- .../runtime/ErrorHandling/MachCodeFramesInErrorFile.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/hotspot/jtreg/runtime/ErrorHandling/MachCodeFramesInErrorFile.java b/test/hotspot/jtreg/runtime/ErrorHandling/MachCodeFramesInErrorFile.java index ba36d5810d8..7608c5f5619 100644 --- a/test/hotspot/jtreg/runtime/ErrorHandling/MachCodeFramesInErrorFile.java +++ b/test/hotspot/jtreg/runtime/ErrorHandling/MachCodeFramesInErrorFile.java @@ -169,6 +169,10 @@ public class MachCodeFramesInErrorFile { Matcher matcher = Pattern.compile("\\[MachCode\\]\\s*\\[Verified Entry Point\\]\\s* # \\{method\\} \\{[^}]*\\} '([^']+)' '([^']+)' in '([^']+)'", Pattern.DOTALL).matcher(hsErr); List machCodeHeaders = matcher.results().map(mr -> String.format("'%s' '%s' in '%s'", mr.group(1), mr.group(2), mr.group(3))).collect(Collectors.toList()); int minExpectedMachCodeSections = Math.max(1, compiledJavaFrames); + if ((hsErr.contains("stop reattempt (retry printing native stack (no source info))") || hsErr.contains("reason: Step time limit reached"))) { + // In this case, the vm only prints the crashing frame. + minExpectedMachCodeSections = 1; + } if (machCodeHeaders.size() < minExpectedMachCodeSections) { Asserts.fail(machCodeHeaders.size() + " < " + minExpectedMachCodeSections); }