Skip to content

Commit be64e4a

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 bb45502 commit be64e4a

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Cargo.toml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,11 @@ rstest = "0.26.0"
429429
rstest_reuse = "0.7.0"
430430
rustc-hash = "2.1.1"
431431
rust-ini = "0.21.0"
432-
rustix = { version = "1.1.4", default-features = false }
432+
# use-libc: route syscalls through glibc instead of direct inline assembly,
433+
# ensuring compatibility with LD_PRELOAD, sanitizers, and glibc optimizations (e.g. getpid cache)
434+
rustix = { version = "1.1.4", default-features = false, features = [
435+
"use-libc",
436+
] }
433437
same-file = "1.0.6"
434438
self_cell = "1.0.4"
435439
selinux = "=0.6.0"

0 commit comments

Comments
 (0)