changeset 11236:0698f220ebdb

Merge
author kevinw
date Thu, 05 Nov 2015 00:35:28 +0000
parents aacd82c455f7 adb000e137f8
children bb189430ea6c
files
diffstat 1 files changed, 9 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/com/sun/tools/jdi/InvokableTypeImpl.java	Wed Nov 04 07:02:20 2015 -0800
+++ b/src/share/classes/com/sun/tools/jdi/InvokableTypeImpl.java	Thu Nov 05 00:35:28 2015 +0000
@@ -236,6 +236,15 @@
                                            final MethodImpl method,
                                            final ValueImpl[] args,
                                            final int options) {
+        /*
+         * Cache the values of args when TRACE_SENDS is enabled, for later printing.
+         * If not cached, printing causes a remote call while synchronized, and deadlock.
+         */
+        if ((vm.traceFlags & VirtualMachineImpl.TRACE_SENDS) != 0) {
+           for (ValueImpl arg: args) {
+              arg.toString();
+           }
+        }
         CommandSender sender = getInvokeMethodSender(thread, method, args, options);
         PacketStream stream;
         if ((options & ClassType.INVOKE_SINGLE_THREADED) != 0) {