You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
A non-UTF-8 argv byte aborts the process: std::env::args() unwraps instead of args_os() #9401
claude -p $'\xff\xfe\x80abc\xc3\x28'
node : rc=1 "Not logged in · Please run /login"
perry: rc=134 (SIGABRT)
thread '<unnamed>' panicked at library/std/src/env.rs:878:51:
called `Result::unwrap()` on an `Err` value: "\xFF\xFE\x80abc\xC3("
std::env::args() panics on any argument that is not valid UTF-8. Non-UTF-8 filenames are ordinary on Linux, so this is reachable by a user simply passing a path, and the panic text leaks Rust internals into the program's stderr.
Fix: use std::env::args_os() and convert lossily (or preserve the bytes) at the boundary, matching node, which accepts the argument and proceeds.
A grep for env::args() elsewhere in the runtime is worthwhile — the same unwrap pattern may appear on other paths.
Found by a differential stress-test of cc 2.1.112 under perry 757beace0.
Activity
fix(runtime): SIGPIPE and non-UTF-8 argv (from #9418) (#9419)
proggeramlug commentedon Sep 2, 2026
Closing: fixed in #9419 (from #9418).