You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Normally the library is extracted to a temp directory with an
appropriately-mangled temp name, but on platforms that cannot
delete the file before exiting the JVM this leaves those library
files to accumulate.
This change builds on the jffi.extract.dir property and adds
jffi.extract.name to specify a specific filename to use every
time, reusing any existing file at that location.
Depending on how these two properties are combined, the file will
be extracted as follows:
* Set neither: file will be extracted with a temp name under the
default temp dir, with attempt to delete and no reuse.
* Set both: file will be the given name in the given path,
reused if existing or extracted otherwise.
* Set only dir: file will be extracted with a temp name under the
specified directory, with attempt to delete and no reuse.
* Set only name: file will be extracted with the given name under
the default temp dir, reused if existing or extracted otherwise.
Note that this does not verify that the loaded file matches the
one bundled with jffi. This is left up to the user, since any
verification of the existing file will be subject to TOC-to-TOU
vulnerability. It is not possible to have the JVM atomically
verify and load the given file.
This partially addresses #97 by allowing Windows users to specify
a known file path to reuse across runs.
0 commit comments