Skip to content

Commit

Permalink
8269882: stack-use-after-scope in NewObjectA
Browse files Browse the repository at this point in the history
Reviewed-by: kbarrett
  • Loading branch information
David Holmes committed Jul 6, 2021
1 parent df0e11b commit 20eba35
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 @@ -976,7 +976,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

3 comments on commit 20eba35

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

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

@RealCLanger
Copy link
Contributor

Choose a reason for hiding this comment

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

/backport jdk17u

@openjdk
Copy link

@openjdk openjdk bot commented on 20eba35 Jul 13, 2021

Choose a reason for hiding this comment

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

@RealCLanger the backport was successfully created on the branch RealCLanger-backport-20eba355 in my personal fork of openjdk/jdk17u. To create a pull request with this backport targeting openjdk/jdk17u:master, just click the following link:

➡️ Create pull request

The title of the pull request is automatically filled in correctly and below you find a suggestion for the pull request body:

Hi all,

this pull request contains a backport of commit 20eba355 from the openjdk/jdk repository.

The commit being backported was authored by David Holmes on 6 Jul 2021 and was reviewed by Kim Barrett.

Thanks!

If you need to update the source branch of the pull then run the following commands in a local clone of your personal fork of openjdk/jdk17u:

$ git fetch https://github.com/openjdk-bots/jdk17u RealCLanger-backport-20eba355:RealCLanger-backport-20eba355
$ git checkout RealCLanger-backport-20eba355
# make changes
$ git add paths/to/changed/files
$ git commit --message 'Describe additional changes made'
$ git push https://github.com/openjdk-bots/jdk17u RealCLanger-backport-20eba355

Please sign in to comment.