mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 14:54:52 +02:00
8029381: assert(is_method_type()) failed: bad cast
Access to method_type and appendix from constant pool (cpcache) needs to be guarded by is_f1_null() because of racy update/initialization. Reviewed-by: kvn, coleenp, jrose
This commit is contained in:
parent
bdb8050bbf
commit
23d6ad76d7
2 changed files with 4 additions and 4 deletions
|
@ -407,7 +407,7 @@ Method* ConstantPoolCacheEntry::method_if_resolved(constantPoolHandle cpool) {
|
|||
|
||||
|
||||
oop ConstantPoolCacheEntry::appendix_if_resolved(constantPoolHandle cpool) {
|
||||
if (is_f1_null() || !has_appendix())
|
||||
if (!has_appendix())
|
||||
return NULL;
|
||||
const int ref_index = f2_as_index() + _indy_resolved_references_appendix_offset;
|
||||
objArrayOop resolved_references = cpool->resolved_references();
|
||||
|
@ -416,7 +416,7 @@ oop ConstantPoolCacheEntry::appendix_if_resolved(constantPoolHandle cpool) {
|
|||
|
||||
|
||||
oop ConstantPoolCacheEntry::method_type_if_resolved(constantPoolHandle cpool) {
|
||||
if (is_f1_null() || !has_method_type())
|
||||
if (!has_method_type())
|
||||
return NULL;
|
||||
const int ref_index = f2_as_index() + _indy_resolved_references_method_type_offset;
|
||||
objArrayOop resolved_references = cpool->resolved_references();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue