< prev index next >
src/share/vm/runtime/stubRoutines.cpp
Print this page
@ rev 7996 : 8075533: Zero JVM segfaults for -version after JDK-8074552
|
*** 211,231 ****
--- 211,234 ----
}
}
// simple test for SafeFetch32
static void test_safefetch32() {
+ if (CanUseSafeFetch32()) {
int dummy = 17;
int* const p_invalid = (int*) get_segfault_address();
int* const p_valid = &dummy;
int result_invalid = SafeFetch32(p_invalid, 0xABC);
assert(result_invalid == 0xABC, "SafeFetch32 error");
int result_valid = SafeFetch32(p_valid, 0xABC);
assert(result_valid == 17, "SafeFetch32 error");
+ }
}
// simple test for SafeFetchN
static void test_safefetchN() {
+ if (CanUseSafeFetchN()) {
#ifdef _LP64
const intptr_t v1 = UCONST64(0xABCD00000000ABCD);
const intptr_t v2 = UCONST64(0xDEFD00000000DEFD);
#else
const intptr_t v1 = 0xABCDABCD;
*** 236,245 ****
--- 239,249 ----
intptr_t* const p_valid = &dummy;
intptr_t result_invalid = SafeFetchN(p_invalid, v2);
assert(result_invalid == v2, "SafeFetchN error");
intptr_t result_valid = SafeFetchN(p_valid, v2);
assert(result_valid == v1, "SafeFetchN error");
+ }
}
#endif
void StubRoutines::initialize2() {
if (_code2 == NULL) {
< prev index next >