Cloners :
|
|
Duplicate :
|
|
Relates :
|
|
Relates :
|
|
Relates :
|
FULL PRODUCT VERSION : A DESCRIPTION OF THE PROBLEM : Calling findSpecial is leaking memory. THE PROBLEM WAS REPRODUCIBLE WITH -Xint FLAG: Did not try THE PROBLEM WAS REPRODUCIBLE WITH -server FLAG: Yes STEPS TO FOLLOW TO REPRODUCE THE PROBLEM : import java.lang.invoke.*; public class Leak { public void callMe() { } public static void main(String[] args) throws Throwable { Leak leak = new Leak(); while(true) { MethodHandles.Lookup lookup = MethodHandles.lookup(); MethodType mt = MethodType.fromMethodDescriptorString("()V", Leak.class.getClassLoader()); // findSpecial leaks some native mem MethodHandle mh = lookup.findSpecial(Leak.class, "callMe", mt, Leak.class); mh.invokeExact(leak); } } } EXPECTED VERSUS ACTUAL BEHAVIOR : Expected: No increase in memory Result: Increase in memory REPRODUCIBILITY : This bug can be reproduced always. ---------- BEGIN SOURCE ---------- import java.lang.invoke.*; public class Leak { public void callMe() { } public static void main(String[] args) throws Throwable { Leak leak = new Leak(); while(true) { MethodHandles.Lookup lookup = MethodHandles.lookup(); MethodType mt = MethodType.fromMethodDescriptorString("()V", Leak.class.getClassLoader()); // findSpecial leaks some native mem MethodHandle mh = lookup.findSpecial(Leak.class, "callMe", mt, Leak.class); mh.invokeExact(leak); } } } ---------- END SOURCE ----------
|