8076185: Provide SafeFetchX implementation for zero

Implement SafeFetchX for zero using setjmp/longjmp and Posix TLS

Reviewed-by: sgehwolf, dholmes
This commit is contained in:
Thomas Stuefe 2015-03-31 05:30:36 -04:00 committed by David Holmes
parent 38c3337610
commit 1afbc04d56
4 changed files with 79 additions and 8 deletions

View file

@ -451,14 +451,10 @@ inline intptr_t SafeFetchN(intptr_t* adr, intptr_t errValue) {
// returns true if SafeFetch32 and SafeFetchN can be used safely (stubroutines are already generated)
inline bool CanUseSafeFetch32() {
// All platforms have the stub but ZERO isn't safe.
assert(StubRoutines::SafeFetch32_stub() != NULL, "should have generated stub");
return NOT_ZERO(true) ZERO_ONLY(false);
return StubRoutines::SafeFetch32_stub() ? true : false;
}
inline bool CanUseSafeFetchN() {
// All platforms have the stub but ZERO isn't safe.
assert(StubRoutines::SafeFetchN_stub() != NULL, "should have generated stub");
return NOT_ZERO(true) ZERO_ONLY(false);
inline bool CanUseSafeFetchN() {
return StubRoutines::SafeFetchN_stub() ? true : false;
}
#endif // SHARE_VM_RUNTIME_STUBROUTINES_HPP