rust/library/std/src/sys
joboet a467516c22
std: fix aliasing bug in UNIX process implementation
`CStringArray` contained both `CString`s and their pointers. Unfortunately, since `CString` uses `Box`, moving the `CString`s into the `Vec` can (under stacked borrows) invalidate the pointer to the string, meaning the resulting `Vec<*const c_char>` was, from an opsem perspective, unusable. This PR removes removes the `Vec<CString>` from `CStringArray`, instead recreating the `CString`/`CStr` from the pointers when necessary. Also,`CStringArray` is now used for the process args as well, the old implementation was suffering from the same kind of bug.
2025-05-23 17:09:00 +02:00
..
alloc use generic Atomic type where possible 2025-04-27 02:18:08 +03:00
anonymous_pipe Mv os-specific trait impl of Pipe* into std::os::* 2025-03-14 01:03:56 +11:00
args Implement Iterator::last for vec::IntoIter 2025-05-02 20:08:28 -07:00
env use generic Atomic type where possible 2025-04-27 02:18:08 +03:00
fd Rollup merge of #139667 - 1c3t3a:remove-no-sanitize, r=m-ou-se 2025-04-17 00:16:21 +02:00
fs Fix settimes for vxworks 2025-05-14 13:52:31 +05:30
io Trusty: Implement write_vectored for stdio 2025-03-27 16:49:30 -07:00
net use generic Atomic type where possible 2025-04-27 02:18:08 +03:00
os_str Make internal OsString::truncate and extend_from_slice unsafe 2025-04-30 23:56:39 -07:00
pal windows: document that we rely on an undocumented property of GetUserProfileDirectoryW 2025-05-19 17:06:02 +02:00
path Use with_native_path for Windows 2025-04-11 18:02:03 +00:00
personality Rollup merge of #137621 - Berrysoft:cygwin-std, r=joboet 2025-03-17 05:47:49 -04:00
process std: fix aliasing bug in UNIX process implementation 2025-05-23 17:09:00 +02:00
random use generic Atomic type where possible 2025-04-27 02:18:08 +03:00
stdio Rollup merge of #139517 - Ayush1325:uefi-cmd-stdin-null, r=joboet 2025-04-15 15:47:25 +10:00
sync collect all Fuchsia bindings into the fuchsia module 2025-05-05 12:16:40 +02:00
thread_local use generic Atomic type where possible 2025-04-27 02:18:08 +03:00
backtrace.rs Improve comments for the default backtrace printer 2024-12-04 20:54:37 -05:00
cmath.rs Initial implementation of core_float_math 2025-05-13 22:08:18 +00:00
env_consts.rs Move zkVM constants into sys::env_consts 2025-04-21 21:05:04 -07:00
exit_guard.rs std: use the address of errno to identify threads in unique_thread_exit 2025-04-01 13:35:16 +02:00
mod.rs Move sys::pal::os::Env into sys::env 2025-04-21 20:56:43 -07:00