Hi Christoph,
Okay, I'll push the fix as:
Contributed-by: groe...@uk.ibm.com
Thanks!
Serguei
On 8/27/17 22:34, Langer, Christoph wrote:
Hi Serguei,
you can push the change
as proposed and add me as reviewer. As IBM has signed a
contribution agreement there should be no issue with
checking in something from Steve.
Best regards
Christoph
Thanks for raising the bug.
No I am not an OpenJDK author hence me
asking for a sponsor and information on how to contribute
the fix for this issue.
Any guidance you can give will be
great.
Steve Groeger
Sent from my iPhone
Hi Steve,
Thank you for reporting this!
I've filed the bug:
https://bugs.openjdk.java.net/browse/JDK-8186776
use ReleaseStringUTFChars instead of
jvmtiDeallocate to release strings
Are you and OpenJDK author?
Thanks,
Serguei
On 8/25/17 10:03, Steve Groeger wrote:
I would like to propose the
change below to
src/jdk.jdwp.agent/share/native/libjdwp/ModuleReferenceImpl.c
native code so that the getName function use
ReleaseStringUTFChars() to release the memory
obtained using GetStringUTFChars() instead of the
current jvmtiDeallocate() method.
The code as is seems to cause a
potential memory leak as the memory may not be
released correctly (as the correct
Release/Deallocate is not being used).
diff --git
a/src/jdk.jdwp.agent/share/native/libjdwp/ModuleReferenceImpl.c
b/src/jdk.jdwp.agent/share/native/libjdwp/ModuleReferenceImpl.c
---
a/src/jdk.jdwp.agent/share/native/libjdwp/ModuleReferenceImpl.c
+++
b/src/jdk.jdwp.agent/share/native/libjdwp/ModuleReferenceImpl.c
@@ -57,7 +57,7 @@
}
(void)outStream_writeString(out, name);
if (name != NULL) {
- jvmtiDeallocate(name);
+ JNI_FUNC_PTR(env,
ReleaseStringUTFChars)(env, namestr, name);
}
return JNI_TRUE;
}
I originally raised this issue on the
core-libs-dev list but they recommended I
raise it on this list.
I would appreciate any
feedback please, and how I would go about
obtaining a sponsor and contributor
Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales
with number 741598.
Registered office: PO Box 41, North Harbour, Portsmouth,
Hampshire PO6 3AU
|