Skip to content

Commit

Permalink
8303948: HsErrFileUtils.checkHsErrFileContent() fails to check the la…
Browse files Browse the repository at this point in the history
…st pattern.

Reviewed-by: dholmes, stuefe
  • Loading branch information
varada1110 authored and David Holmes committed Mar 21, 2023
1 parent bbca7c3 commit a72ba38
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions test/hotspot/jtreg/runtime/ErrorHandling/HsErrFileUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,8 @@ public static void checkHsErrFileContent(File f, Pattern[] positivePatterns, Pat
lastLine = line;
lineNo++;
}
// Found all positive pattern?
if (!positivePatternStack.isEmpty()) {
// If the current pattern is not null then it didn't match
if (currentPositivePattern != null) {
throw new RuntimeException("hs-err file incomplete (first missing pattern: " + currentPositivePattern.pattern() + ")");
}
if (checkEndMarker && !lastLine.equals("END.")) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public static void main(String[] args) throws Exception {
patterns.add(Pattern.compile("# .*VMError::controlled_crash.*"));

// Crash address: see VMError::_segfault_address
String crashAddress = Platform.isAix() ? "0x0*1400" : "0x0*400";
String crashAddress = Platform.isAix() ? "0xffffffffffffffff" : "0x0*400";
patterns.add(Pattern.compile("siginfo: si_signo: \\d+ \\(SIGSEGV\\), si_code: \\d+ \\(SEGV_.*\\), si_addr: " + crashAddress + ".*"));

HsErrFileUtils.checkHsErrFileContent(f, patterns.toArray(new Pattern[] {}), true);
Expand Down

1 comment on commit a72ba38

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.