JNA requires a temporary directory which is not mounted noexec, but JNA also uses libffi which itself requires a temporary directory that isn't mounted noexec. If none of the usual suspects work, libffi will fall back to $HOME which will often work, but in general might also not permit executables (or even exist).
We override the temporary directory that JNA uses by setting the java.io.tmpdir system property to ES_TMPDIR. I believe we should do the same thing for libffi, by setting the LIBFFI_TMPDIR environment variable. We should also document that this can be overridden much as we do for the jna.tmpdir system property (which trumps java.io.tmpdir if set).
Fixing this would, I believe, also fix #73309.
JNA requires a temporary directory which is not mounted
noexec, but JNA also useslibffiwhich itself requires a temporary directory that isn't mountednoexec. If none of the usual suspects work,libffiwill fall back to$HOMEwhich will often work, but in general might also not permit executables (or even exist).We override the temporary directory that JNA uses by setting the
java.io.tmpdirsystem property toES_TMPDIR. I believe we should do the same thing forlibffi, by setting theLIBFFI_TMPDIRenvironment variable. We should also document that this can be overridden much as we do for thejna.tmpdirsystem property (which trumpsjava.io.tmpdirif set).Fixing this would, I believe, also fix #73309.