Code Review 7103549: Remove dependencies on libjava and libjvm from security libraries

Alan Bateman Alan.Bateman at oracle.com
Sat Oct 22 14:03:49 UTC 2011


Chris Hegarty wrote:
> All of the security native libraries have runtime dependencies on 
> libjava and libjvm, most of which are completely unnecessary. This CR 
> proposes to remove these dependencies and provide localized versions 
> of the trivial utility functions that are being used from libjava, 
> i.e. the JNU_ThrowXXX functions.
>
> There is also a dependency on JNI_GetCreatedJavaVMs which can easily 
> be removed by caching a reference to the JavaVM when the library is 
> loaded, in JNI_OnLoad, and making this reference available within the 
> library itself.
>
> http://cr.openjdk.java.net/~chegar/7103549/webrev.oo/webrev/
>
> -Chris.
Just to put more context on this, one of the prerequisites to splitting 
the JDK into a set of modules with native libraries that live in 
per-module directories is that we eliminate the dependencies between 
native libraries that will, in all likelihood, be in separate modules. I 
prototyped the JDK changes some time ago but didn't have time to get 
over the finish time. Chris has agreed to take up the running on this so 
this is the first of several changes to address these dependencies.

Chris - looks good to me and thanks for taking this. Minor comment on 
the comment in Defs.gmk (and I know this will go away once all the 
changes are in) is that the comment "A list of Programs' makefiles" 
might be better as "The makefiles for these packages do not link against 
libjvm and libjava".

-Alan.




More information about the security-dev mailing list