From 27bfad7694e9db75cbf5990958a874fcb39dc96f Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Tue, 31 Mar 2026 09:01:15 +0200 Subject: [PATCH] deps(rustix): enable use-libc to route syscalls through glibc Without use-libc, rustix uses direct inline assembly syscalls, bypassing glibc entirely. On a glibc-based system like Debian, this can break LD_PRELOAD interposition, sanitizers, and miss glibc optimizations like the getpid() cache. --- Cargo.toml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 75b6b07c8..dc3d5c734 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -450,9 +450,11 @@ rstest = "0.26.0" rstest_reuse = "0.7.0" rustc-hash = "2.1.1" rust-ini = "0.21.0" -# binary name of coreutils can be hijacked by overriding getauxval via LD_PRELOAD -# So we use param and avoid libc backend -rustix = { version = "1.1.4", features = ["param"] } +# use-libc: route syscalls through glibc instead of direct inline assembly, +# ensuring compatibility with LD_PRELOAD, sanitizers, and glibc optimizations (e.g. getpid cache) +rustix = { version = "1.1.4", default-features = false, features = [ + "use-libc", +] } same-file = "1.0.6" self_cell = "1.0.4" selinux = "0.6"