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:
David Chase 2014-06-02 14:32:29 -04:00
parent bdb8050bbf
commit 23d6ad76d7
2 changed files with 4 additions and 4 deletions

View file

@ -348,8 +348,8 @@ class ConstantPoolCacheEntry VALUE_OBJ_CLASS_SPEC {
bool is_final() const { return (_flags & (1 << is_final_shift)) != 0; }
bool is_forced_virtual() const { return (_flags & (1 << is_forced_virtual_shift)) != 0; }
bool is_vfinal() const { return (_flags & (1 << is_vfinal_shift)) != 0; }
bool has_appendix() const { return (_flags & (1 << has_appendix_shift)) != 0; }
bool has_method_type() const { return (_flags & (1 << has_method_type_shift)) != 0; }
bool has_appendix() const { return (!is_f1_null()) && (_flags & (1 << has_appendix_shift)) != 0; }
bool has_method_type() const { return (!is_f1_null()) && (_flags & (1 << has_method_type_shift)) != 0; }
bool is_method_entry() const { return (_flags & (1 << is_field_entry_shift)) == 0; }
bool is_field_entry() const { return (_flags & (1 << is_field_entry_shift)) != 0; }
bool is_byte() const { return flag_state() == btos; }