Java Solaris Communities Sun Store Join SDN My Profile Why Join?
 
Bug Database
Bug Detail
Quick Lists
Top 25 Bugs
Top 25 RFE's
Recently Closed Bugs
Printable Page Printable Page


Bug Database
Bug ID: 6252173
Votes 0
Synopsis JVMTI Spec: SetJNIFunctionTable spec may not be achievable with the way that JNIEnv is declared
Category hotspot:jvmti
Reported Against
Release Fixed mustang(b53)
State 10-Fix Delivered, bug
Priority: 2-High
Related Bugs
Submit Date 07-APR-2005
Description
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.

  xxxxx@xxxxx   2005-04-07 18:40:53 GMT
Posted Date : 2005-07-28 01:19:30.0
Work Around
N/A
Evaluation
Spec must be updated per Description.
Posted Date : 2005-07-28 01:19:30.0
Comments
  
  Include a link with my name & email   


PLEASE NOTE: JDK6 is formerly known as Project Mustang