[PATCH] Fix some JVMTI thinkos

Keith Seitz keiths@redhat.com
Tue Sep 19 23:14:00 GMT 2006


Hi,

I am going to commit this as kind of obvious (now that it has been 
found). This patch fixes two bugs in jvmti.cc. [Okay, that and I'd like 
to prune the number of jvmti.cc patches I'm hanging on to and revising.]

First, we were passing an incorrect (albeit not illegal) parameter 
THREAD_CHECK_VALID, which needs a java::lang::Thread* not a 
java::lang::Object* (which is what jthread is defined as).

Second we were dereferencing a pointer that was just freed. Ouch.

If there are any problems, please don't hesitate to email me (and/or 
YELL, SCREAM, flame, etc).

Keith

ChangeLog
2006-09-19  Keith Seitz  <keiths@redhat.com>

         * jvmti.cc (THREAD_DEFAULT_TO_CURRENT): Clarify parameter list.
         (THREAD_CHECK_VALID): Likewise.
         (THREAD_CHECK_ALIVE): Likewise.
         (_Jv_JVMTI_SuspendThread): Call THREAD_CHECK_VALID on a Thread not
         jthread.
         (_Jv_JVMTI_ResumeThread): Likewise.
         (_Jv_JVMTI_InterruptThread): Likewise.

         (_Jv_JVMTI_DisposeEnvironment): Probably unwise to dereference 
an object
         that was just freed.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: jvmti-bugs.patch
Type: text/x-patch
Size: 2403 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/java-patches/attachments/20060919/9f8c6981/attachment.bin>


More information about the Java-patches mailing list