This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: Get libffi closures to cope with SELinux execmem/execmod
- From: Tom Tromey <tromey at redhat dot com>
- To: Alexandre Oliva <aoliva at redhat dot com>
- Cc: Hans Boehm <Hans dot Boehm at hp dot com>, Andrew Haley <aph at redhat dot com>, gcc-patches at gcc dot gnu dot org, java-patches at gcc dot gnu dot org
- Date: 14 Feb 2007 22:02:16 -0700
- Subject: Re: Get libffi closures to cope with SELinux execmem/execmod
- References: <ork5zkiz8v.fsf@redhat.com> <17839.26733.654885.743254@zebedee.pink> <ortzynbre6.fsf@redhat.com> <Pine.GHP.4.58.0701190016420.29118@tomil.hpl.hp.com> <orhcuizr8q.fsf@redhat.com>
- Reply-to: tromey at redhat dot com
>>>>> "Alexandre" == Alexandre Oliva <aoliva@redhat.com> writes:
Alexandre> I ask because I reasoned I could create a GC-managed
Alexandre> pointer to the closure list, and register a finalizer for
Alexandre> that pointer such that the closure list would only get
Alexandre> deallocated when the class that held the pointer to it was
Alexandre> collected.
This whole thread makes my head hurt.
There is an already-existing solution, albeit an expensive one. We
could use a PhantomReference on the Class whose enqueueing behavior is
to free the closures.
But after reading the rest of the thread I'm not sure whether phantom
references really work properly as-is. And, anyhow, I think this
approach would require us to have a cleanup thread.
Tom