I made one:
import java.lang.invoke.*;
import static java.lang.invoke.MethodHandles.*;
import static java.lang.invoke.MethodType.*;
public class RM implements Runnable {
public static void main(String... args) throws Throwable {
new Thread(new RM()).start();
}
public static RM test() {
return null;
}
public void run() {
try {
MethodHandle m1 = MethodHandles.lookup().findStatic(RM.class,
"test", methodType(RM.class));
RM v = (RM)m1.invokeExact();
} catch (Throwable t) {
t.printStackTrace();
}
}
}
The problem is that make_invoke_method only does extra allocation when there
are non-bcp methods on the stack and there's no ResourceMark above the run()
method of a thread. make_invoke_method just needs a ResourceMark. I filed
7082949 for this. Thanks for the report.
tom
On Aug 24, 2011, at 10:54 AM, Mark Roos wrote:
> I do have a test case that repeats the resource mark error. We are trying a
> new packaging so you should be able to run it
> without an external connection.
>
> Hopefully later today
>
> mark_______________________________________________
> mlvm-dev mailing list
> [email protected]
> http://mail.openjdk.java.net/mailman/listinfo/mlvm-dev
_______________________________________________
mlvm-dev mailing list
[email protected]
http://mail.openjdk.java.net/mailman/listinfo/mlvm-dev