Skip to content

Commit 042389f

Browse files
committed
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.
1 parent 1f3a621 commit 042389f

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

Cargo.toml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -452,9 +452,11 @@ rstest = "0.26.0"
452452
rstest_reuse = "0.7.0"
453453
rustc-hash = "2.1.1"
454454
rust-ini = "0.21.0"
455-
# binary name of coreutils can be hijacked by overriding getauxval via LD_PRELOAD
456-
# So we use param and avoid libc backend
457-
rustix = { version = "1.1.4", features = ["param"] }
455+
# use-libc: route syscalls through glibc instead of direct inline assembly,
456+
# ensuring compatibility with LD_PRELOAD, sanitizers, and glibc optimizations (e.g. getpid cache)
457+
rustix = { version = "1.1.4", default-features = false, features = [
458+
"use-libc",
459+
] }
458460
same-file = "1.0.6"
459461
self_cell = "1.0.4"
460462
selinux = "0.6"

0 commit comments

Comments
 (0)