The specification for SetJNIFunctionTable states: "Set the JNI function table in all current and future JNI environments. As a result, all future JNI calls are directed to the specified functions." However the assertion that all future JNI calls will be directs may conflict with the definition of JNIEnv in the standard jni.h header file: struct JNIEnv_ { const struct JNINativeInterface_ *functions; : } #ifdef __cplusplus typedef JNIEnv_ JNIEnv; #else typedef const struct JNINativeInterface_ *JNIEnv; #endif As "functions" is a pointer to a readonly function table it's possible that some compilers might optimize away the access to the table. The JVMTI spec needs to be updated to make it clear that the future JNI calls will only be directed when JNI code re-fetches the function address. ###@###.### 2005-04-07 18:40:53 GMT
|