Skip to content

A self-improving RLM agent for coding workflows and long-running autonomous tasks.

Rust

Bump tokio to 1.54.1 for RUSTSEC-2026-0386 (#3747)

Sebastian Müllerd374e7197334
diff --git a/Cargo.lock b/Cargo.lock
index 84ffa1b1fc..c43032a564 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -59,7 +59,7 @@ version = "1.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "40c48f72fd53cd289104fc64099abca73db4166ad86ea0b4341abe65af83dadc"
dependencies = [
- "windows-sys 0.61.2",
+ "windows-sys 0.60.2",
]
[[package]]
@@ -70,7 +70,7 @@ checksum = "291e6a250ff86cd4a820112fb8898808a366d8f9f58ce16d1f538353ad55747d"
dependencies = [
"anstyle",
"once_cell_polyfill",
- "windows-sys 0.61.2",
+ "windows-sys 0.60.2",
]
[[package]]
@@ -573,7 +573,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb"
dependencies = [
"libc",
- "windows-sys 0.61.2",
+ "windows-sys 0.52.0",
]
[[package]]
@@ -1858,7 +1858,7 @@ dependencies = [
"once_cell",
"socket2",
"tracing",
- "windows-sys 0.61.2",
+ "windows-sys 0.52.0",
]
[[package]]
@@ -2165,7 +2165,7 @@ dependencies = [
"errno",
"libc",
"linux-raw-sys 0.12.1",
- "windows-sys 0.61.2",
+ "windows-sys 0.52.0",
]
[[package]]
@@ -2433,7 +2433,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c3d1e2c7f27f8d4cb10542a02c49005dbd6e93095799d6f3be745fae9f8fedd4"
dependencies = [
"libc",
- "windows-sys 0.61.2",
+ "windows-sys 0.60.2",
]
[[package]]
@@ -2572,7 +2572,7 @@ dependencies = [
"getrandom 0.4.3",
"once_cell",
"rustix 1.1.4",
- "windows-sys 0.61.2",
+ "windows-sys 0.52.0",
]
[[package]]
@@ -2643,9 +2643,9 @@ checksum = "fd3ca314f692efd6c868f8408f53fe444634a845f96c028b97d35f6a1f79f0ee"
[[package]]
name = "tokio"
-version = "1.53.1"
+version = "1.54.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "202caea871b69668250d242070849eb495be178ed697a3e98aebce5bc81a0bed"
+checksum = "b52fd3255258d26fac7264ab5a76b53c13367136dc011d3d6ad4f8ed070396a3"
dependencies = [
"bytes",
"libc",
@@ -3156,7 +3156,7 @@ version = "0.1.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22"
dependencies = [
- "windows-sys 0.61.2",
+ "windows-sys 0.52.0",
]
[[package]]
diff --git a/crates/pa-core/src/platform/process.rs b/crates/pa-core/src/platform/process.rs
index b013a9cc69..c6caeaef55 100644
--- a/crates/pa-core/src/platform/process.rs
+++ b/crates/pa-core/src/platform/process.rs
@@ -413,9 +413,10 @@ pub async fn wait_for_exit(pid: u32) -> std::io::Result<()> {
Err(error) if error.raw_os_error() == Some(libc::ESRCH) => return Ok(()),
Err(error) => return Err(error),
};
- // SAFETY: `open_pidfd` returned a fresh descriptor this call owns
- // (and closes on drop, on every path).
- let fd = AsyncFd::with_interest(unsafe { OwnedFd::from_raw_fd(fd) }, Interest::READABLE)?;
+ // SAFETY: `open_pidfd` returned a fresh descriptor this call owns; the
+ // `AsyncFd` owns the `OwnedFd`, so it stays open and unchanged until drop.
+ let fd =
+ unsafe { AsyncFd::register_with_interest(OwnedFd::from_raw_fd(fd), Interest::READABLE) }?;
// Every wake is confirmed by a zero-timeout poll (AsyncFd readiness
// can be spurious).
loop {
@@ -495,7 +496,8 @@ pub async fn wait_for_exit(pid: u32) -> std::io::Result<()> {
};
}
}
- let kq = AsyncFd::with_interest(kq, Interest::READABLE)?;
+ // SAFETY: the `AsyncFd` owns `kq`, so it stays open and unchanged until drop.
+ let kq = unsafe { AsyncFd::register_with_interest(kq, Interest::READABLE) }?;
// Only the exit knote is registered, so a drained event is the exit.
loop {
let mut ready = kq.readable().await?;