8312014: [s390x] TestSigInfoInHsErrFile.java Failure

Reviewed-by: stuefe, amitkumar, tsteele
This commit is contained in:
Sidraya 2023-07-19 18:49:24 +00:00 committed by Tyler Steele
parent b5b6f4e7a7
commit 6f6621303a
10 changed files with 31 additions and 2 deletions

View File

@ -27,6 +27,7 @@
#define CPU_AARCH64_GLOBALDEFINITIONS_AARCH64_HPP
const int StackAlignmentInBytes = 16;
const size_t pd_segfault_address = 1024;
// Indicates whether the C calling conventions require that
// 32-bit integer argument values are extended to 64 bits.

View File

@ -26,6 +26,7 @@
#define CPU_ARM_GLOBALDEFINITIONS_ARM_HPP
const int StackAlignmentInBytes = 8;
const size_t pd_segfault_address = 1024;
// Indicates whether the C calling conventions require that
// 32-bit integer argument values are extended to 64 bits.

View File

@ -31,6 +31,12 @@ const int BytesPerInstWord = 4;
const int StackAlignmentInBytes = 16;
#ifdef AIX
const size_t pd_segfault_address = -1;
#else
const size_t pd_segfault_address = 1024;
#endif
// Indicates whether the C calling conventions require that
// 32-bit integer argument values are extended to 64 bits.
const bool CCallingConventionRequiresIntsAsLongs = true;

View File

@ -28,6 +28,7 @@
#define CPU_RISCV_GLOBALDEFINITIONS_RISCV_HPP
const int StackAlignmentInBytes = 16;
const size_t pd_segfault_address = 1024;
// Indicates whether the C calling conventions require that
// 32-bit integer argument values are extended to 64 bits.

View File

@ -30,6 +30,10 @@
const int StackAlignmentInBytes = 16;
// All faults on s390x give the address only on page granularity.
// Set Pdsegfault_address to minimum one page address.
const size_t pd_segfault_address = 4096;
#define SUPPORTS_NATIVE_CX8
#define CPU_MULTI_COPY_ATOMIC

View File

@ -26,6 +26,7 @@
#define CPU_X86_GLOBALDEFINITIONS_X86_HPP
const int StackAlignmentInBytes = 16;
const size_t pd_segfault_address = 1024;
// Indicates whether the C calling conventions require that
// 32-bit integer argument values are extended to 64 bits.

View File

@ -37,5 +37,12 @@
// Indicates whether the C calling conventions require that
// 32-bit integer argument values are extended to 64 bits.
const bool CCallingConventionRequiresIntsAsLongs = false;
#if defined(AIX)
const size_t pd_segfault_address = -1;
#elif defined(S390)
const size_t pd_segfault_address = 4096;
#else
const size_t pd_segfault_address = 1024;
#endif
#endif // CPU_ZERO_GLOBALDEFINITIONS_ZERO_HPP

View File

@ -99,6 +99,7 @@ const char* VMError::_filename;
int VMError::_lineno;
size_t VMError::_size;
const size_t VMError::_reattempt_required_stack_headroom = 64 * K;
const intptr_t VMError::segfault_address = pd_segfault_address;
// List of environment variables that should be reported in error log file.
static const char* env_list[] = {

View File

@ -207,7 +207,7 @@ public:
DEBUG_ONLY(static void controlled_crash(int how);)
// Non-null address guaranteed to generate a SEGV mapping error on read, for test purposes.
static constexpr intptr_t segfault_address = AIX_ONLY(-1) NOT_AIX(1 * K);
static const intptr_t segfault_address;
// Max value for the ErrorLogPrintCodeLimit flag.
static const int max_error_log_print_code = 10;

View File

@ -68,7 +68,14 @@ public class TestSigInfoInHsErrFile {
patterns.add(Pattern.compile("# .*VMError::controlled_crash.*"));
// Crash address: see VMError::_segfault_address
String crashAddress = Platform.isAix() ? "0xffffffffffffffff" : "0x0*400";
String crashAddress = "0x0*400";
if (Platform.isAix()) {
crashAddress = "0xffffffffffffffff";
} else if (Platform.isS390x()) {
// All faults on s390x give the address only on page granularity.
// Hence fault address is first page address.
crashAddress = "0x0*1000";
}
patterns.add(Pattern.compile("siginfo: si_signo: \\d+ \\(SIGSEGV\\), si_code: \\d+ \\(SEGV_.*\\), si_addr: " + crashAddress + ".*"));
HsErrFileUtils.checkHsErrFileContent(f, patterns.toArray(new Pattern[] {}), true);