8279356: Method linking fails with guarantee(mh->adapter() != NULL) failed: Adapter blob must already exist!

Reviewed-by: chagedorn, kvn, coleenp
This commit is contained in:
Tobias Hartmann 2022-01-11 06:59:26 +00:00
parent 92307e5a94
commit 6d7db4b0b3
2 changed files with 51 additions and 10 deletions

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2021, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2022, 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
@ -1198,7 +1198,7 @@ void Method::unlink_method() {
void Method::link_method(const methodHandle& h_method, TRAPS) {
// If the code cache is full, we may reenter this function for the
// leftover methods that weren't linked.
if (_i2i_entry != NULL) {
if (adapter() != NULL) {
return;
}
assert( _code == NULL, "nothing compiled yet" );