-
-
Notifications
You must be signed in to change notification settings - Fork 17.4k
std::os::unix::process::CommandExt::exec should be unsafe #46775
Copy link
Copy link
Closed
Labels
C-bugCategory: This is a bug.Category: This is a bug.I-unsoundIssue: A soundness hole (worst kind of bug), see: https://en.wikipedia.org/wiki/SoundnessIssue: A soundness hole (worst kind of bug), see: https://en.wikipedia.org/wiki/SoundnessT-libs-api[DEPRECATED; DO NOT USE][DEPRECATED; DO NOT USE]
Description
Activity
Metadata
Metadata
Assignees
Labels
C-bugCategory: This is a bug.Category: This is a bug.I-unsoundIssue: A soundness hole (worst kind of bug), see: https://en.wikipedia.org/wiki/SoundnessIssue: A soundness hole (worst kind of bug), see: https://en.wikipedia.org/wiki/SoundnessT-libs-api[DEPRECATED; DO NOT USE][DEPRECATED; DO NOT USE]
This method assigns to
environoutside of any lock, meaning that it's automatically unsafe for multi-threaded programs.For single-threaded programs, if the
execfails,environwill point to memory that has been freed. The documentation gives a false sense of security: