Linking libgcj, and Java security

Jeff Sturm jsturm@one-point.com
Wed Dec 4 19:33:00 GMT 2002


On Wed, 4 Dec 2002, Boehm, Hans wrote:
> Do we all agree on what the CNI rules are about pointers to collectable
> objects in C/C++ data structures/libraries?

My hunch is it doesn't make much sense to worry about pointers in non-java
libraries that aren't linked to libgcj (e.g. libz.so).

> I have a secondary concern about the use of static constructors in all
> of this.  Is there a way to avoid them?

I don't know.

> My recollection is that
> ordering issues eventually got in the way of most other attempts to use
> constructors in libgcj.  The collector now avoids them.  Their use here
> also seems brittle to me since the garbage collector (and presumably
> some Java code?) can be run before main().

I think Bryce eliminated most static initializers in the code, so they are
only used to register classes and resources.  That seems pretty safe.

Jeff



More information about the Java mailing list