8164086: Checked JNI pending exception check should be cleared when returning to Java frame

Transitions to Java clear the pending pointer

Reviewed-by: dholmes, neliasso, coleenp
This commit is contained in:
David Simms 2016-09-13 09:04:44 +02:00
parent c719b0171c
commit 1c2da5f5ed
14 changed files with 381 additions and 3 deletions

View file

@ -1487,6 +1487,11 @@ address TemplateInterpreterGenerator::generate_native_entry(bool synchronized) {
__ set(_thread_in_Java, G3_scratch);
__ st(G3_scratch, thread_state);
if (CheckJNICalls) {
// clear_pending_jni_exception_check
__ st_ptr(G0, G2_thread, JavaThread::pending_jni_exception_check_fn_offset());
}
// reset handle block
__ ld_ptr(G2_thread, JavaThread::active_handles_offset(), G3_scratch);
__ st(G0, G3_scratch, JNIHandleBlock::top_offset_in_bytes());