about summary refs log tree commit diff
path: root/tests/codegen/src-hash-algorithm
diff options
context:
space:
mode:
authorjoboet <jonasboettiger@icloud.com>2025-03-24 18:12:21 +0100
committerjoboet <jonasboettiger@icloud.com>2025-05-23 17:09:00 +0200
commita467516c2208474ec21b0ea139c45f7d41cbad7e (patch)
tree11e5ceeac5b2fb8cbb4de84ecb6737840f1197f3 /tests/codegen/src-hash-algorithm
parent163cb4ea3f0ae3bc7921cc259a08a7bf92e73ee6 (diff)
downloadrust-a467516c2208474ec21b0ea139c45f7d41cbad7e.tar.gz
rust-a467516c2208474ec21b0ea139c45f7d41cbad7e.zip
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.
Diffstat (limited to 'tests/codegen/src-hash-algorithm')
0 files changed, 0 insertions, 0 deletions