mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-21 11:34:38 +02:00
8023542: Test java/io/File/CheckPermission.java fails due to unfinished recursion (java.lang.StackOverflowError) when JIT'ed code (-client,-server) is running
Move null check before klass reference materialization in checkcast Reviewed-by: kvn, roland
This commit is contained in:
parent
0f418a050c
commit
f99391ee6f
1 changed files with 8 additions and 8 deletions
|
@ -1724,14 +1724,6 @@ void LIR_Assembler::emit_typecheck_helper(LIR_OpTypeCheck *op, Label* success, L
|
|||
}
|
||||
|
||||
assert_different_registers(obj, k_RInfo, klass_RInfo);
|
||||
if (!k->is_loaded()) {
|
||||
klass2reg_with_patching(k_RInfo, op->info_for_patch());
|
||||
} else {
|
||||
#ifdef _LP64
|
||||
__ mov_metadata(k_RInfo, k->constant_encoding());
|
||||
#endif // _LP64
|
||||
}
|
||||
assert(obj != k_RInfo, "must be different");
|
||||
|
||||
__ cmpptr(obj, (int32_t)NULL_WORD);
|
||||
if (op->should_profile()) {
|
||||
|
@ -1748,6 +1740,14 @@ void LIR_Assembler::emit_typecheck_helper(LIR_OpTypeCheck *op, Label* success, L
|
|||
} else {
|
||||
__ jcc(Assembler::equal, *obj_is_null);
|
||||
}
|
||||
|
||||
if (!k->is_loaded()) {
|
||||
klass2reg_with_patching(k_RInfo, op->info_for_patch());
|
||||
} else {
|
||||
#ifdef _LP64
|
||||
__ mov_metadata(k_RInfo, k->constant_encoding());
|
||||
#endif // _LP64
|
||||
}
|
||||
__ verify_oop(obj);
|
||||
|
||||
if (op->fast_check()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue