--- a/hotspot/src/cpu/x86/vm/sharedRuntime_x86_64.cpp Wed Feb 15 22:19:13 2017 -0500
+++ b/hotspot/src/cpu/x86/vm/sharedRuntime_x86_64.cpp Thu Feb 16 10:41:19 2017 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -2579,11 +2579,14 @@
__ reset_last_Java_frame(false);
- // Unbox oop result, e.g. JNIHandles::resolve value.
+ // Unpack oop result
if (ret_type == T_OBJECT || ret_type == T_ARRAY) {
- __ resolve_jobject(rax /* value */,
- r15_thread /* thread */,
- rcx /* tmp */);
+ Label L;
+ __ testptr(rax, rax);
+ __ jcc(Assembler::zero, L);
+ __ movptr(rax, Address(rax, 0));
+ __ bind(L);
+ __ verify_oop(rax);
}
if (CheckJNICalls) {