8027572: assert(r != 0) failed: invalid

Null classes should be expected in profiles with conflicts

Reviewed-by: kvn, iveresov
This commit is contained in:
Roland Westrelin 2013-11-13 13:45:50 +01:00
parent a5b4fba397
commit 3fbc683322
6 changed files with 129 additions and 9 deletions

View file

@ -275,23 +275,23 @@ void VirtualCallTypeData::post_initialize(BytecodeStream* stream, MethodData* md
}
bool TypeEntries::is_loader_alive(BoolObjectClosure* is_alive_cl, intptr_t p) {
return !is_type_none(p) &&
!((Klass*)klass_part(p))->is_loader_alive(is_alive_cl);
Klass* k = (Klass*)klass_part(p);
return k != NULL && k->is_loader_alive(is_alive_cl);
}
void TypeStackSlotEntries::clean_weak_klass_links(BoolObjectClosure* is_alive_cl) {
for (int i = 0; i < _number_of_entries; i++) {
intptr_t p = type(i);
if (is_loader_alive(is_alive_cl, p)) {
set_type(i, type_none());
if (!is_loader_alive(is_alive_cl, p)) {
set_type(i, with_status((Klass*)NULL, p));
}
}
}
void ReturnTypeEntry::clean_weak_klass_links(BoolObjectClosure* is_alive_cl) {
intptr_t p = type();
if (is_loader_alive(is_alive_cl, p)) {
set_type(type_none());
if (!is_loader_alive(is_alive_cl, p)) {
set_type(with_status((Klass*)NULL, p));
}
}