Mercurial > hg > graal-jvmci-8
diff src/cpu/sparc/vm/c1_LIRGenerator_sparc.cpp @ 24170:0b85ccd62409 jdk8u131-b01
8168699: Validate special case invocations
Reviewed-by: kevinw, vlivanov
author | coleenp |
---|---|
date | Tue, 13 Dec 2016 14:37:04 -0500 |
parents | 32b682649973 |
children |
line wrap: on
line diff
--- a/src/cpu/sparc/vm/c1_LIRGenerator_sparc.cpp Tue Dec 13 10:07:12 2016 -0800 +++ b/src/cpu/sparc/vm/c1_LIRGenerator_sparc.cpp Tue Dec 13 14:37:04 2016 -0500 @@ -1023,11 +1023,16 @@ obj.load_item(); LIR_Opr out_reg = rlock_result(x); CodeStub* stub; - 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*/)); 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); }