Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 3.2k
Android does not support faccessat2 #24860
Copy link
Copy link
Open
Labels
bugObserved behavior contradicts documented or intended behaviorObserved behavior contradicts documented or intended behavioros-androidAndroid (Linux variant)Android (Linux variant)standard libraryThis issue involves writing Zig code for the standard library.This issue involves writing Zig code for the standard library.
Milestone
Description
Metadata
Metadata
Assignees
Labels
bugObserved behavior contradicts documented or intended behaviorObserved behavior contradicts documented or intended behavioros-androidAndroid (Linux variant)Android (Linux variant)standard libraryThis issue involves writing Zig code for the standard library.This issue involves writing Zig code for the standard library.
Zig Version
0.15.0-dev.1519+dd4e25cf4
Steps to Reproduce and Observed Behavior
Since #23541 Zig unconditionally uses the
faccessat2syscall instd.os.linux.faccessat.Unfortunately Android does not support this syscall, and due to their seccomp filter it results in the process receiving a SIGSYS.
Results in the program terminating with
Unknown signal 31.Additionally, I have observed this happening when running a
zig build-exeusing a Zig debug build without LLVM, because it tried to check forbuild.zigwithfaccessat2. The prebuilt release I have tested does not show this behaviour.Go also ran into this issue previously, see golang/go#57393.
Expected Behavior
The
faccessat2syscall should not be used on Android.This might be difficult at the moment, since Zig treats Android as Linux, has no separate release builds for Android and currently as far as I can tell no proper detection of the Android ABI.