|
Re: Bug in java_nio_VMDirectByteBuffer.c: msg#00128java.classpath.patches
Archie Cobbs wrote: Another common problem is using too many local native references, e.g., Well, soon as I sent that I ran into exactly this problem. Don't have time to fix it right now (and I'm sure there are others...) In gnu_java_awt_peer_gtk_GdkPixbufDecoder.c, in the function query_formats(), there is a loop where (*env)->NewStringUTF() is invoked over and over again. There are two bugs actually: 1- The function exhausts the pool of local native references. It should use DeleteLocalRef() to free them as it goes along. 2- It doesn't check for exceptions from any of the JNI functions it invokes. In my case, (*env)->NewStringUTF() threw an exception because of #1, but the exception was not checked for because of #2, causing an assertion failure. So just fixing #1 would fix the crash in practice. For #2 it probably suffices for now to use assert() like is done earlier in the function after the FindClass() call. -Archie __________________________________________________________________________ Archie Cobbs * CTO, Awarix * http://www.awarix.com
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: Bug in java_nio_VMDirectByteBuffer.c, Archie Cobbs |
|---|---|
| Next by Date: | Re: Bug in java_nio_VMDirectByteBuffer.c, Archie Cobbs |
| Previous by Thread: | Re: Bug in java_nio_VMDirectByteBuffer.c, Archie Cobbs |
| Next by Thread: | Re: Bug in java_nio_VMDirectByteBuffer.c, Archie Cobbs |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |