Skip to content

Commit 27bfad7

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 0ab7479 commit 27bfad7

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
@@ -450,9 +450,11 @@ rstest = "0.26.0"
450450
rstest_reuse = "0.7.0"
451451
rustc-hash = "2.1.1"
452452
rust-ini = "0.21.0"
453-
# binary name of coreutils can be hijacked by overriding getauxval via LD_PRELOAD
454-
# So we use param and avoid libc backend
455-
rustix = { version = "1.1.4", features = ["param"] }
453+
# use-libc: route syscalls through glibc instead of direct inline assembly,
454+
# ensuring compatibility with LD_PRELOAD, sanitizers, and glibc optimizations (e.g. getpid cache)
455+
rustix = { version = "1.1.4", default-features = false, features = [
456+
"use-libc",
457+
] }
456458
same-file = "1.0.6"
457459
self_cell = "1.0.4"
458460
selinux = "0.6"

0 commit comments

Comments
 (0)