This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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:

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


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