+2007-03-06 Kyle Galloway <kgallowa@redhat.com>
+ * jvmti.cc(_Jv_JVMTI_GetLocalVariableTable): Fix _Jv_Malloc parameters.
+ * testsuite/libjava.jvmti/interp/natgetlocalvartable.cc
+ (do_getlocalvartable_tests): Add Deallocate calls to free strings.
+
2007-03-05 Matthias Klose <doko@debian.org>
* Makefile.am (gij_LDFLAGS): Use dbexecdir.
table_slot)
>= 0)
{
+ char **str_ptr = &(*locals)[table_slot].name;
jerr = env->Allocate (static_cast<jlong> (strlen (name) + 1),
- reinterpret_cast<unsigned char **>
- (&(*locals)[table_slot].name));
+ reinterpret_cast<unsigned char **> (str_ptr));
if (jerr != JVMTI_ERROR_NONE)
return jerr;
strcpy ((*locals)[table_slot].name, name);
-
- jerr = env->Allocate (static_cast<jlong> (strlen (name) + 1),
- reinterpret_cast<unsigned char **>
- (&(*locals)[table_slot].signature));
+
+ str_ptr = &(*locals)[table_slot].signature;
+ jerr = env->Allocate (static_cast<jlong> (strlen (sig) + 1),
+ reinterpret_cast<unsigned char **> (str_ptr));
if (jerr != JVMTI_ERROR_NONE)
return jerr;
strcpy ((*locals)[table_slot].signature, sig);
-
- jerr = env->Allocate (static_cast<jlong> (strlen (name) + 1),
- reinterpret_cast<unsigned char **>
- (&(*locals)[table_slot].generic_signature));
+
+ str_ptr = &(*locals)[table_slot].generic_signature;
+ jerr = env->Allocate (static_cast<jlong> (strlen (generic_sig) + 1),
+ reinterpret_cast<unsigned char **> (str_ptr));
if (jerr != JVMTI_ERROR_NONE)
return jerr;
strcpy ((*locals)[table_slot].generic_signature, generic_sig);
{
printf ("Slot: %d\n", static_cast<int> (var_table[j].slot));
printf (" Name: %s\n", var_table[j].name);
+ jvmti->Deallocate (reinterpret_cast<unsigned char *> (var_table[j].name));
printf (" Sig: %s\n", var_table[j].signature);
+ jvmti->Deallocate (reinterpret_cast<unsigned char *> (var_table[j].signature));
printf (" Gen Sig: %s\n", var_table[j].generic_signature);
+ jvmti->Deallocate (reinterpret_cast<unsigned char *> (var_table[j].generic_signature));
printf (" Start Loc: %ld\n", static_cast<long> (var_table[j].start_location));
printf (" Length: %d\n", static_cast<int> (var_table[j].length));
}