mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-26 22:34:27 +02:00
8228340: JVMCI deleteGlobalHandle doesn't delete the handle
Add missing call to OopStorage::release() when deleting global handles in JVMCI to prevent handles leak. Reviewed-by: kvn, dlong
This commit is contained in:
parent
0fa1047733
commit
4d471e7845
3 changed files with 10 additions and 2 deletions
|
@ -2181,8 +2181,7 @@ C2V_VMENTRY_NULL(jobject, getObject, (JNIEnv* env, jobject, jobject x, long disp
|
|||
C2V_VMENTRY(void, deleteGlobalHandle, (JNIEnv* env, jobject, jlong h))
|
||||
jobject handle = (jobject)(address)h;
|
||||
if (handle != NULL) {
|
||||
assert(JVMCI::is_global_handle(handle), "Invalid delete of global JNI handle");
|
||||
*((oop*)handle) = NULL; // Mark the handle as deleted, allocate will reuse it
|
||||
JVMCI::destroy_global(handle);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue