harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Leo Li (JIRA)" <j...@apache.org>
Subject [jira] Created: (HARMONY-3008) [classlib][instrument]Releases byte array too early in the native code of redefine classes.
Date Tue, 16 Jan 2007 07:11:27 GMT
[classlib][instrument]Releases byte array too early in the native code of redefine classes.

                 Key: HARMONY-3008
                 URL: https://issues.apache.org/jira/browse/HARMONY-3008
             Project: Harmony
          Issue Type: Bug
            Reporter: Leo Li

In instrument.c, Java_org_apache_harmony_instrument_internal_InstrumentationImpl_redefineClasses_1native,
we have:
Line 237:
     class_bytes = (*env)->GetByteArrayElements(env, jclass_bytes, &copy);
		  if(NULL == class_bytes){
		  class_byte_count = (*env)->GetArrayLength(env, jclass_bytes);
          if(copy == JNI_TRUE){
		    (*env)->ReleaseByteArrayElements(env,jclass_bytes, class_bytes, JNI_ABORT);
		  //construct a jvmtiClassDefinition element		  

	  //perform redefinition
	  err=(*jvmti)->RedefineClasses(jvmti, length, class_definitions);
the class_bytes are freed before RedefineClasses of JVM_TI uses them.

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


View raw message