Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/hotspot/os/posix/safefetch_sigjmp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,14 @@ ATTRIBUTE_NO_ASAN static bool _SafeFetchXX_internal(const T *adr, T* result) {

T n = 0;

#ifdef AIX
// AIX allows reading from nullptr without signalling
if (adr == nullptr) {
*result = 0;
return false;
}
#endif

// Set up a jump buffer. Anchor its pointer in TLS. Then read from the unsafe address.
// If that address was invalid, we fault, and in the signal handler we will jump back
// to the jump point.
Expand Down