aboutsummaryrefslogtreecommitdiff
path: root/src/cpu/x86
diff options
context:
space:
mode:
authorcoleenp <none@none>2016-12-13 14:37:04 -0500
committercoleenp <none@none>2016-12-13 14:37:04 -0500
commit75972e7a622a7164da83f7a8d9fb3631cb1269cb (patch)
tree73a4fd3ecfe3dcd960c5fd2e7c0849b92fe01ff9 /src/cpu/x86
parent2437e56caa88b94268796ca20eff426c332fcdff (diff)
downloadjdk8u_hotspot-75972e7a622a7164da83f7a8d9fb3631cb1269cb.tar.gz
8168699: Validate special case invocations
Reviewed-by: kevinw, vlivanov
Diffstat (limited to 'src/cpu/x86')
-rw-r--r--src/cpu/x86/vm/c1_LIRGenerator_x86.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/cpu/x86/vm/c1_LIRGenerator_x86.cpp b/src/cpu/x86/vm/c1_LIRGenerator_x86.cpp
index 70176a289..48cab82b0 100644
--- a/src/cpu/x86/vm/c1_LIRGenerator_x86.cpp
+++ b/src/cpu/x86/vm/c1_LIRGenerator_x86.cpp
@@ -1228,12 +1228,17 @@ void LIRGenerator::do_CheckCast(CheckCast* x) {
obj.load_item();
// info for exceptions
- CodeEmitInfo* info_for_exception = state_for(x);
+ CodeEmitInfo* info_for_exception =
+ (x->needs_exception_state() ? state_for(x) :
+ state_for(x, x->state_before(), true /*ignore_xhandler*/));
CodeStub* stub;
if (x->is_incompatible_class_change_check()) {
assert(patching_info == NULL, "can't patch this");
stub = new SimpleExceptionStub(Runtime1::throw_incompatible_class_change_error_id, LIR_OprFact::illegalOpr, info_for_exception);
+ } else if (x->is_invokespecial_receiver_check()) {
+ assert(patching_info == NULL, "can't patch this");
+ stub = new DeoptimizeStub(info_for_exception);
} else {
stub = new SimpleExceptionStub(Runtime1::throw_class_cast_exception_id, obj.result(), info_for_exception);
}