OSDN Git Service

Remove dangerous logging code from unlockMonitor. It is unsafe to
authorCarl Shapiro <cshapiro@google.com>
Tue, 20 Apr 2010 07:53:13 +0000 (00:53 -0700)
committerCarl Shapiro <cshapiro@google.com>
Tue, 20 Apr 2010 07:53:13 +0000 (00:53 -0700)
dereference a potentially corrupt lock word to retrieve additional
information about the lock state.  This code was added to debug a
transient error and has since been removed from other branches.

Change-Id: I5aabae531c52532929e8dbb71bdcc6cb7cee64f9

vm/Sync.c

index 1405315..ebf2ad0 100644 (file)
--- a/vm/Sync.c
+++ b/vm/Sync.c
@@ -520,10 +520,8 @@ static bool unlockMonitor(Thread* self, Monitor* mon)
          * The JNI spec says that we should throw IllegalMonitorStateException
          * in this case.
          */
-        dvmThrowExceptionFmt("Ljava/lang/IllegalMonitorStateException;",
-                             "unlock of unowned monitor, self=%d owner=%d",
-                             self->threadId,
-                             mon->owner ? mon->owner->threadId : 0);
+        dvmThrowException("Ljava/lang/IllegalMonitorStateException;",
+                          "unlock of unowned monitor");
         return false;
     }
     return true;