harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hinde...@apache.org
Subject svn commit: r821713 - /harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/OSMemory.c
Date Mon, 05 Oct 2009 08:17:41 GMT
Author: hindessm
Date: Mon Oct  5 08:17:41 2009
New Revision: 821713

URL: http://svn.apache.org/viewvc?rev=821713&view=rev
Log:
Fixing "*** glibc detected *** free(): invalid pointer: 0xd774dcb8 ***" crash
in org.apache.harmony.nio.tests.java.nio.DirectByteBufferTest.

Modified:
    harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/OSMemory.c

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/OSMemory.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/OSMemory.c?rev=821713&r1=821712&r2=821713&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/OSMemory.c (original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/OSMemory.c Mon
Oct  5 08:17:41 2009
@@ -77,7 +77,7 @@
   jbyte *bytes = (*env)->GetPrimitiveArrayCritical(env, byteArray, &isCopy);
   memcpy ((void *) ((IDATA) address),
 	  (const jbyte *) ((IDATA) bytes + offset), (size_t) length);
-  (*env)->ReleaseByteArrayElements(env, byteArray, bytes, JNI_ABORT);
+  (*env)->ReleasePrimitiveArrayCritical(env, byteArray, bytes, JNI_ABORT);
 }
 
 JNIEXPORT jbyte JNICALL Java_org_apache_harmony_luni_platform_OSMemory_getByte



Mime
View raw message