Skip to content
Permalink
Browse files
8265984: Concurrent GC: Some tests fail "assert(is_frame_safe(f)) fai…
…led: Frame must be safe"

Reviewed-by: eosterlund, stefank, zgu
  • Loading branch information
pliden committed May 3, 2021
1 parent 1d9ea3a commit 194bceca3a4d13d4528b86359ee9d5eead3ce7ac
Showing with 5 additions and 2 deletions.
  1. +4 −1 src/hotspot/share/gc/z/zBarrierSetNMethod.cpp
  2. +1 −1 src/hotspot/share/opto/runtime.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
@@ -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));
@@ -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
@@ -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");

1 comment on commit 194bcec

@openjdk-notifier

This comment has been minimized.

Copy link

@openjdk-notifier openjdk-notifier bot commented on 194bcec May 3, 2021

Please sign in to comment.