Request for review- RFE 8005716
Mike Duigou
mike.duigou at oracle.com
Wed Mar 6 17:50:16 UTC 2013
Hi Bill;
Some notes from reviewing the JDK side changes.
System.java/Runtime.java:
The example which begins with the name "If the filename argument, " needs to better identify that "L" is an example. (Italics?)
java/lang/ClassLoader.java:
NativeLibrary::fromClass could be final.
ClassLoader.c:
In Java_java_lang_ClassLoader_00024NativeLibrary_findBuiltinLib()
These two values are known at compile time.
int prefixLen = (int) strlen(JNI_LIB_PREFIX);
int suffixLen = (int) strlen(JNI_LIB_SUFFIX);
Some of the error conditions don't throw exceptions. Such as:
if (cname == NULL) {
return NULL;
}
The prefix and suffix are stripped from cname without checking that cname actually contains the prefix or suffix.
if (len > prefixLen) is invariant.
src/solaris/native/common/jni_util_md.c:
void* getProcessHandle() {
static void* procHandle = NULL;
if (procHandle == NULL) {
procHandle = (void*)dlopen(NULL, RTLD_LAZY);
}
return procHandle;
}
Why is the error handling code commented out?
Mike
On Mar 5 2013, at 15:05 , bill.pittore at oracle.com wrote:
> This request is tied to bugid 8005716 that deals with adding support for statically linked JNI libraries.
>
> The JEP is here: http://openjdk.java.net/jeps/178
>
> The bug is here:http://bugs.sun.com/view_bug.do?bug_id=8005716
>
> The webrevs are here:
>
> http://cr.openjdk.java.net/~bpittore/8005716/jdk-webrev.00/
> http://cr.openjdk.java.net/~bpittore/8005716/hs-webrev.00/
>
> The main piece of functionality is to check for the presence of JNI_OnLoad_libname to determine if the library specified by 'libname' has been statically linked into the VM. If the symbol is found, it is assumed that the library is linked in and will not be dynamically loaded.
>
> thanks,
> bill
More information about the core-libs-dev
mailing list