This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC 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: gcc-patches at gcc dot gnu dot org, java-patches at gcc dot gnu dot org
- Date: 14 Feb 2007 21:58:34 -0700
- Subject: Re: Get libffi closures to cope with SELinux execmem/execmod
- References: <ork5zkiz8v.fsf@redhat.com>
- Reply-to: tromey at redhat dot com
>>>>> "Alexandre" == Alexandre Oliva <aoliva@redhat.com> writes:
Finally went through this thread.
Alexandre> +void *
Alexandre> +_Jv_AllocClosure (jsize size, void **code)
Alexandre> +{
Alexandre> + return ffi_closure_alloc (size, code);
Alexandre> +}
It is ok to have the libjava code directly call ffi_closure_alloc and
ffi_closure_free. We're already making direct calls to the various
ffi functions, so this extra layer isn't needed.
The other, GC-related, allocation functions go through an extra layer
because, back in the day, we considered being able to swap out GCs.
(And, at least one person actually did this... but on the whole we'd
probably have done better to make direct calls.)
Tom