Skip to content

Commit

Permalink
8265984: Concurrent GC: Some tests fail "assert(is_frame_safe(f)) fai…
Browse files Browse the repository at this point in the history
…led: Frame must be safe"

Reviewed-by: eosterlund, stefank, zgu
  • Loading branch information
pliden committed May 3, 2021
1 parent 1d9ea3a commit 194bcec
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/hotspot/share/gc/z/zBarrierSetNMethod.cpp
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2018, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2018, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -29,6 +29,7 @@
#include "gc/z/zNMethod.hpp"
#include "gc/z/zThreadLocalData.hpp"
#include "logging/log.hpp"
#include "runtime/threadWXSetters.inline.hpp"

bool ZBarrierSetNMethod::nmethod_entry_barrier(nmethod* nm) {
ZLocker<ZReentrantLock> locker(ZNMethod::lock_for_nmethod(nm));
Expand All @@ -40,6 +41,8 @@ bool ZBarrierSetNMethod::nmethod_entry_barrier(nmethod* nm) {
return true;
}

MACOS_AARCH64_ONLY(ThreadWXEnable wx(WXWrite, Thread::current()));

if (nm->is_unloading()) {
// We don't need to take the lock when unlinking nmethods from
// the Method, because it is only concurrently unlinked by
Expand Down
2 changes: 1 addition & 1 deletion src/hotspot/share/opto/runtime.cpp
Expand Up @@ -1377,7 +1377,7 @@ address OptoRuntime::handle_exception_C(JavaThread* current) {
// deoptimized frame

if (nm != NULL) {
RegisterMap map(current, false /* update_map */, false /* process_frames */);
RegisterMap map(current, false);
frame caller = current->last_frame().sender(&map);
#ifdef ASSERT
assert(caller.is_compiled_frame(), "must be");
Expand Down

1 comment on commit 194bcec

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.