--- a/hotspot/src/share/vm/c1/c1_GraphBuilder.cpp Thu Mar 09 00:16:51 2017 -0800
+++ b/hotspot/src/share/vm/c1/c1_GraphBuilder.cpp Thu Mar 09 14:27:21 2017 +0100
@@ -1540,7 +1540,7 @@
ciMethod* caller = state()->scope()->method();
ciMethodData* md = caller->method_data_or_null();
ciProfileData* data = md->bci_to_data(invoke_bci);
- if (data->is_CallTypeData() || data->is_VirtualCallTypeData()) {
+ if (data != NULL && (data->is_CallTypeData() || data->is_VirtualCallTypeData())) {
bool has_return = data->is_CallTypeData() ? ((ciCallTypeData*)data)->has_return() : ((ciVirtualCallTypeData*)data)->has_return();
// May not be true in case of an inlined call through a method handle intrinsic.
if (has_return) {
@@ -1758,7 +1758,7 @@
start = has_receiver ? 1 : 0;
if (profile_arguments()) {
ciProfileData* data = method()->method_data()->bci_to_data(bci());
- if (data->is_CallTypeData() || data->is_VirtualCallTypeData()) {
+ if (data != NULL && (data->is_CallTypeData() || data->is_VirtualCallTypeData())) {
n = data->is_CallTypeData() ? data->as_CallTypeData()->number_of_arguments() : data->as_VirtualCallTypeData()->number_of_arguments();
}
}
@@ -4349,7 +4349,7 @@
}
ciMethodData* md = m->method_data_or_null();
ciProfileData* data = md->bci_to_data(invoke_bci);
- if (data->is_CallTypeData() || data->is_VirtualCallTypeData()) {
+ if (data != NULL && (data->is_CallTypeData() || data->is_VirtualCallTypeData())) {
append(new ProfileReturnType(m , invoke_bci, callee, ret));
}
}