-
Bug
-
Resolution: Fixed
-
P4
-
16, 17
-
b06
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8266995 | 16u-cpu | Richard Reingruber | P4 | Resolved | Fixed | master |
JDK-8264511 | 16.0.2 | Richard Reingruber | P4 | Resolved | Fixed | b04 |
SonarCloud reports the potential bug:
Potential leak of memory pointed to by 'owned_monitors_list'
...in code like this:
jvmtiError
JvmtiEnv::GetOwnedMonitorInfo(JavaThread* java_thread, jint* owned_monitor_count_ptr, jobject** owned_monitors_ptr) {
...
// growable array of jvmti monitors info on the C-heap
GrowableArray<jvmtiMonitorStackDepthInfo*> *owned_monitors_list =
new (ResourceObj::C_HEAP, mtServiceability) GrowableArray<jvmtiMonitorStackDepthInfo*>(1, mtServiceability);
EscapeBarrier eb(true, calling_thread, java_thread);
if (!eb.deoptimize_objects(MaxJavaStackTraceDepth)) {
return JVMTI_ERROR_OUT_OF_MEMORY;
}
There are other instances, all of them near new blocks added byJDK-8227745.
Potential leak of memory pointed to by 'owned_monitors_list'
...in code like this:
jvmtiError
JvmtiEnv::GetOwnedMonitorInfo(JavaThread* java_thread, jint* owned_monitor_count_ptr, jobject** owned_monitors_ptr) {
...
// growable array of jvmti monitors info on the C-heap
GrowableArray<jvmtiMonitorStackDepthInfo*> *owned_monitors_list =
new (ResourceObj::C_HEAP, mtServiceability) GrowableArray<jvmtiMonitorStackDepthInfo*>(1, mtServiceability);
EscapeBarrier eb(true, calling_thread, java_thread);
if (!eb.deoptimize_objects(MaxJavaStackTraceDepth)) {
return JVMTI_ERROR_OUT_OF_MEMORY;
}
There are other instances, all of them near new blocks added by
- backported by
-
JDK-8264511 Potential memory leaks in JVMTI after JDK-8227745
- Resolved
-
JDK-8266995 Potential memory leaks in JVMTI after JDK-8227745
- Resolved
- relates to
-
JDK-8227745 Enable Escape Analysis for Better Performance in the Presence of JVMTI Agents
- Resolved
- links to
-
Commit openjdk/jdk16u/72be1e24
-
Commit openjdk/jdk/6d4a593f
-
Review openjdk/jdk16u/87
-
Review openjdk/jdk/2055
(2 links to)