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
{{ message }}
Repository navigation
ffi: new DynamicLibrary() reads a VFS path before checking --allow-ffi #67368
How often does it reproduce? Is there a required condition?
Always. It requires --permission without --allow-ffi, a mounted VFS, and a path under the VFS mount point. It happens only with new DynamicLibrary(path). ffi.dlopen() checks the permission first.
What is the expected behavior? Why is that the expected behavior?
Both calls should throw ERR_ACCESS_DENIED:
new DynamicLibrary(): ERR_ACCESS_DENIEDffi.dlopen(): ERR_ACCESS_DENIED
The FFI docs say "When using the Permission Model, FFI APIs are restricted unless the --allow-ffi flag is provided". The new DynamicLibrary(path) section says a VFS path "loads the same way as with ffi.dlopen()", and ffi.dlopen() already throws ERR_ACCESS_DENIED here.
What do you see instead?
new DynamicLibrary(): ENOENTffi.dlopen(): ERR_ACCESS_DENIED
If the VFS file exists, the constructor reads all of its bytes and only then throws ERR_ACCESS_DENIED.
Activity