1222 void Deoptimization::load_class_by_index(constantPoolHandle constant_pool, int index) { |
1222 void Deoptimization::load_class_by_index(constantPoolHandle constant_pool, int index) { |
1223 EXCEPTION_MARK; |
1223 EXCEPTION_MARK; |
1224 load_class_by_index(constant_pool, index, THREAD); |
1224 load_class_by_index(constant_pool, index, THREAD); |
1225 if (HAS_PENDING_EXCEPTION) { |
1225 if (HAS_PENDING_EXCEPTION) { |
1226 // Exception happened during classloading. We ignore the exception here, since it |
1226 // Exception happened during classloading. We ignore the exception here, since it |
1227 // is going to be rethrown since the current activation is going to be deoptimzied and |
1227 // is going to be rethrown since the current activation is going to be deoptimized and |
1228 // the interpreter will re-execute the bytecode. |
1228 // the interpreter will re-execute the bytecode. |
1229 CLEAR_PENDING_EXCEPTION; |
1229 CLEAR_PENDING_EXCEPTION; |
|
1230 // Class loading called java code which may have caused a stack |
|
1231 // overflow. If the exception was thrown right before the return |
|
1232 // to the runtime the stack is no longer guarded. Reguard the |
|
1233 // stack otherwise if we return to the uncommon trap blob and the |
|
1234 // stack bang causes a stack overflow we crash. |
|
1235 assert(THREAD->is_Java_thread(), "only a java thread can be here"); |
|
1236 JavaThread* thread = (JavaThread*)THREAD; |
|
1237 bool guard_pages_enabled = thread->stack_yellow_zone_enabled(); |
|
1238 if (!guard_pages_enabled) guard_pages_enabled = thread->reguard_stack(); |
|
1239 assert(guard_pages_enabled, "stack banging in uncommon trap blob may cause crash"); |
1230 } |
1240 } |
1231 } |
1241 } |
1232 |
1242 |
1233 JRT_ENTRY(void, Deoptimization::uncommon_trap_inner(JavaThread* thread, jint trap_request)) { |
1243 JRT_ENTRY(void, Deoptimization::uncommon_trap_inner(JavaThread* thread, jint trap_request)) { |
1234 HandleMark hm; |
1244 HandleMark hm; |