This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Patch: FYI: fix jvmti test case
- From: Tom Tromey <tromey at redhat dot com>
- To: Java Patch List <java-patches at gcc dot gnu dot org>
- Date: 20 Oct 2006 15:35:37 -0600
- Subject: Patch: FYI: fix jvmti test case
- Reply-to: tromey at redhat dot com
I'm checking this in on the trunk.
Andreas found a crash in a jvmti test. The cause turned out to be
that we were passing a scalar but the jvmti code was expecting a jvalue.
Tom
Index: ChangeLog
from Tom Tromey <tromey@redhat.com>
* testsuite/libjava.jvmti/natevents.cc (do_callback_arg_tests):
Correctly pass jvalues.
Index: testsuite/libjava.jvmti/natevents.cc
===================================================================
--- testsuite/libjava.jvmti/natevents.cc (revision 117912)
+++ testsuite/libjava.jvmti/natevents.cc (working copy)
@@ -498,14 +498,18 @@
_Jv_JVMTI_PostEvent (JVMTI_EVENT_FIELD_ACCESS, (jthread) 0x2,
(JNIEnv *) 0x1, (jmethodID) 0x3, (jlocation) 0x4,
(jclass) 0x5, (jobject) 0x6, (jfieldID) 0x7);
+ jvalue value;
+ value.l = (jobject) 0x9;
_Jv_JVMTI_PostEvent (JVMTI_EVENT_FIELD_MODIFICATION, (jthread) 0x2,
(JNIEnv *) 0x1, (jmethodID) 0x3, (jlocation) 0x4,
(jclass) 0x5, (jobject) 0x6, (jfieldID) 0x7,
- (int) '8', (/*jvalue*/ jobject) 0x9);
+ (int) '8', value);
_Jv_JVMTI_PostEvent (JVMTI_EVENT_METHOD_ENTRY, (jthread) 0x2,
(JNIEnv *) 0x1, (jmethodID) 0x3);
+ jvalue value2;
+ value2.i = 5;
_Jv_JVMTI_PostEvent (JVMTI_EVENT_METHOD_EXIT, (jthread) 0x2,
- (JNIEnv *) 0x1, (jmethodID) 0x3, 4, /*jvalue*/ 5);
+ (JNIEnv *) 0x1, (jmethodID) 0x3, 4, value2);
_Jv_JVMTI_PostEvent (JVMTI_EVENT_NATIVE_METHOD_BIND, (jthread) 0x2,
(JNIEnv *) 0x1, (jmethodID) 0x3, (void *) 0x4,
(void **) 0x5);