8259373: c1 and jvmci runtime code use ResetNoHandleMark incorrectly

Reviewed-by: kvn
This commit is contained in:
Coleen Phillimore 2021-01-07 23:04:11 +00:00
parent 555641ede5
commit b996cccf12
3 changed files with 11 additions and 16 deletions

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1999, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1999, 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
@ -640,7 +640,7 @@ address Runtime1::exception_handler_for_pc(JavaThread* thread) {
oop exception = thread->exception_oop();
address pc = thread->exception_pc();
// Still in Java mode
DEBUG_ONLY(ResetNoHandleMark rnhm);
DEBUG_ONLY(NoHandleMark nhm);
nmethod* nm = NULL;
address continuation = NULL;
{
@ -1307,7 +1307,6 @@ int Runtime1::move_klass_patching(JavaThread* thread) {
debug_only(NoHandleMark nhm;)
{
// Enter VM mode
ResetNoHandleMark rnhm;
patch_code(thread, load_klass_patching_id);
}
@ -1326,7 +1325,6 @@ int Runtime1::move_mirror_patching(JavaThread* thread) {
debug_only(NoHandleMark nhm;)
{
// Enter VM mode
ResetNoHandleMark rnhm;
patch_code(thread, load_mirror_patching_id);
}
@ -1345,7 +1343,6 @@ int Runtime1::move_appendix_patching(JavaThread* thread) {
debug_only(NoHandleMark nhm;)
{
// Enter VM mode
ResetNoHandleMark rnhm;
patch_code(thread, load_appendix_patching_id);
}
@ -1365,14 +1362,14 @@ int Runtime1::move_appendix_patching(JavaThread* thread) {
// assembly code in the cpu directories.
//
int Runtime1::access_field_patching(JavaThread* thread) {
//
// NOTE: we are still in Java
//
Thread* THREAD = thread;
debug_only(NoHandleMark nhm;)
//
// NOTE: we are still in Java
//
// Handles created in this function will be deleted by the
// HandleMarkCleaner in the transition to the VM.
NoHandleMark nhm;
{
// Enter VM mode
ResetNoHandleMark rnhm;
patch_code(thread, access_field_patching_id);
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2015, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2015, 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
@ -703,8 +703,6 @@ address CompiledMethod::continuation_for_implicit_exception(address pc, bool for
#ifdef ASSERT
if (cont_offset == 0) {
Thread* thread = Thread::current();
ResetNoHandleMark rnm; // Might be called from LEAF/QUICK ENTRY
HandleMark hm(thread);
ResourceMark rm(thread);
CodeBlob* cb = CodeCache::find_blob(pc);
assert(cb != NULL && cb == this, "");

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2012, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 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
@ -368,7 +368,7 @@ address JVMCIRuntime::exception_handler_for_pc(JavaThread* thread) {
oop exception = thread->exception_oop();
address pc = thread->exception_pc();
// Still in Java mode
DEBUG_ONLY(ResetNoHandleMark rnhm);
DEBUG_ONLY(NoHandleMark nhm);
CompiledMethod* cm = NULL;
address continuation = NULL;
{