This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: GC changes/enhancements
- To: "Boehm, Hans" <hans_boehm at hp dot com>
- Subject: Re: GC changes/enhancements
- From: Tom Tromey <tromey at redhat dot com>
- Date: 09 Feb 2001 00:53:15 -0700
- Cc: java at gcc dot gnu dot org, "'Matthias Klose'" <doko at cs dot tu-berlin dot de>, ovidiu at cup dot hp dot com, "'Helge Hess'" <helge dot hess at skyrix dot com>
- References: <140D21516EC2D3119EE700902787664401E3A8B5@hplex1.hpl.hp.com>
- Reply-To: tromey at redhat dot com
>>>>> "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