8303948: HsErrFileUtils.checkHsErrFileContent() fails to check the last pattern.

Reviewed-by: dholmes, stuefe
This commit is contained in:
Varada M 2023-03-21 05:45:58 +00:00 committed by David Holmes
parent bbca7c3ede
commit a72ba38347
2 changed files with 3 additions and 3 deletions

View File

@ -130,8 +130,8 @@ public class HsErrFileUtils {
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.")) {

View File

@ -68,7 +68,7 @@ public class TestSigInfoInHsErrFile {
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);