This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: GC changes/enhancements


>>>>> "Hans" == Boehm, Hans <hans_boehm@hp.com> writes:

Hans> What's the right mechanism for setting this?  Probably gcc
Hans> should build the library without ALL_INTERIOR_POINTERS.  Any
Hans> client that needs ALL_INTERIOR_POINTERS can define some special
Hans> symbol which is checked at startup.  Any C visible version of
Hans> the library should define that symbol by default.  I'm not sure
Hans> I understand the linker rules well enough to design the right
Hans> mechanism.

You could use a weak reference, but I don't think they're available on
all platforms.  Maybe it doesn't matter, though.  They might be
available on every interesting platform.  I really don't know.

Some applications might be able to do it by setting a global variable
in a C++ static constructor.  For libgcj that is hard because we
already have these all over (and some are generated by gcj), and you
can't control the ordering in a portable way.

The low-tech solution is to simply require ever user to define the
variable.  Maybe there are weird issues with this on Windows.  I don't
know much about how DLLs work.

Hans> Can anyone see any problems with this mechanism in the libgcj
Hans> context?  Are gcj applications running as "root" an issue?

I don't know that we're ready yet for suid use.  I certainly haven't
done any auditing of libgcj.  The GC could just ignore the environment
variables if the program is run suid or as root.  Or maybe there could
be a link-time mechanism to disable them.  I'm not sure how much of a
concern it is right now.

Tom


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]