Skip to content

Commit

Permalink
8269882: stack-use-after-scope in NewObjectA
Browse files Browse the repository at this point in the history
Backport-of: 20eba35515073c4daf1fa8ac78a37196ea196690
  • Loading branch information
RealCLanger committed Jul 23, 2021
1 parent c6812be commit de786bb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/hotspot/share/prims/jni.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -977,7 +977,7 @@ JNI_ENTRY(jobject, jni_NewObjectA(JNIEnv *env, jclass clazz, jmethodID methodID,
HOTSPOT_JNI_NEWOBJECTA_ENTRY(env, clazz, (uintptr_t) methodID);

jobject obj = NULL;
DT_RETURN_MARK(NewObjectA, jobject, (const jobject)obj);
DT_RETURN_MARK(NewObjectA, jobject, (const jobject&)obj);

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

1 comment on commit de786bb

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.