Bug in JNI RegisterNatives?

Juerg Lehni juerg@scratchdisk.com
Mon May 29 22:29:00 GMT 2006


I'm happy to write the patch but would need to know a few more things 
first.
Some questions:
- Is _Jv_LookupJNIMethod used each time a methods registered in that 
way is called, or is it only called once, and then linked directly to 
the native pointer?
- Should I create a new struct as a base for nathash, or continue to 
use JNINativeMethod and just concatenate the class name and the 
method name, seperated with a '.' and store that in the 
JNINativeMethod name field? I guess a new struct would be cleaner, as 
JNINativeMethod is also used outside jni.cc.
- What is the easiest way to retrieve the class name in UTF8 format? 
Is there something faster / easier than klass->getName() and then 
convert?
Jürg
Am 29.05.2006 um 23:14 schrieb Tom Tromey:
>>>>>> "Juerg" == Juerg Lehni <juerg@scratchdisk.com> writes:
>> Juerg> I believe I discovered a rather serious bug in GCJ's 
> implementation
> Juerg> of JNI RegisterNatives.
>> Yes, I think you're right.
>> Juerg> This should not be too hard to fix. One could for example 
> use the
> Juerg> class name plus the mehtod name instead of only the method 
> name when
> Juerg> storing native methods in nathash.
>> Yeah, I think we should do this.
>> If you're not planning to submit a patch, could you file this in
> bugzilla?
>> Tom



More information about the Java mailing list

AltStyle によって変換されたページ (->オリジナル) /