Skip to content

Commit de786bb

Browse files
committed
8269882: stack-use-after-scope in NewObjectA
Backport-of: 20eba35515073c4daf1fa8ac78a37196ea196690
1 parent c6812be commit de786bb

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/hotspot/share/prims/jni.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -977,7 +977,7 @@ JNI_ENTRY(jobject, jni_NewObjectA(JNIEnv *env, jclass clazz, jmethodID methodID,
977977
HOTSPOT_JNI_NEWOBJECTA_ENTRY(env, clazz, (uintptr_t) methodID);
978978

979979
jobject obj = NULL;
980-
DT_RETURN_MARK(NewObjectA, jobject, (const jobject)obj);
980+
DT_RETURN_MARK(NewObjectA, jobject, (const jobject&)obj);
981981

982982
instanceOop i = InstanceKlass::allocate_instance(JNIHandles::resolve_non_null(clazz), CHECK_NULL);
983983
obj = JNIHandles::make_local(THREAD, i);

0 commit comments

Comments
 (0)