This is the mail archive of the java-patches@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]
Other format: [Raw text]

Re: Get libffi closures to cope with SELinux execmem/execmod


>>>>> "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


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