Skip to content

Commit

Permalink
Change to in 8183925
Browse files Browse the repository at this point in the history
  • Loading branch information
benty-amzn committed Sep 10, 2024
1 parent 777db4c commit a3f63e5
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion hotspot/src/os/posix/vm/os_posix.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -876,7 +876,7 @@ bool os::ThreadCrashProtection::call(os::CrashProtectionCallback& cb) {

Thread::muxAcquire(&_crash_mux, "CrashProtection");

_protected_thread = ThreadLocalStorage::thread();
_protected_thread = Thread::current_or_null();
assert(_protected_thread != NULL, "Cannot crash protect a NULL thread");

// we cannot rely on sigsetjmp/siglongjmp to save/restore the signal mask
Expand Down
2 changes: 1 addition & 1 deletion hotspot/src/os/windows/vm/os_windows.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4881,7 +4881,7 @@ bool os::ThreadCrashProtection::call(os::CrashProtectionCallback& cb) {

Thread::muxAcquire(&_crash_mux, "CrashProtection");

_protected_thread = ThreadLocalStorage::thread();
_protected_thread = Thread::current_or_null();
assert(_protected_thread != NULL, "Cannot crash protect a NULL thread");

bool success = true;
Expand Down
2 changes: 1 addition & 1 deletion hotspot/src/share/vm/runtime/os.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -619,7 +619,7 @@ void* os::malloc(size_t size, MEMFLAGS memflags, const NativeCallStack& stack) {

// Since os::malloc can be called when the libjvm.{dll,so} is
// first loaded and we don't have a thread yet we must accept NULL also here.
assert(!os::ThreadCrashProtection::is_crash_protected(ThreadLocalStorage::thread()),
assert(!os::ThreadCrashProtection::is_crash_protected(Thread::current_or_null()),
"malloc() not allowed when crash protection is set");

if (size == 0) {
Expand Down

0 comments on commit a3f63e5

Please sign in to comment.