| Age | Commit message (Collapse) | Author | Lines |
|
Expose `Utf8Lossy` as `Utf8Chunks`
This PR changes the feature for `Utf8Lossy` from `str_internals` to `utf8_lossy` and improves the API. This is done to eventually expose the API as stable.
Proposal: rust-lang/libs-team#54
Tracking Issue: #99543
|
|
|
|
Avoid zeroing a 1kb stack buffer on every call to `std::sys::windows::fill_utf16_buf`
I've also tried to be slightly more careful about integer overflows, although in practice this is likely still not handled ideally.
r? `@ChrisDenton`
|
|
Mitigate stale data reads on SGX platform
Intel disclosed the Stale Data Read vulnerability yesterday. In order to mitigate this issue completely, reading userspace from an SGX enclave must be aligned and in 8-bytes chunks. This PR implements this mitigation
References:
- https://www.intel.com/content/www/us/en/security-center/advisory/intel-sa-00657.html
- https://www.intel.com/content/www/us/en/developer/articles/technical/software-security-guidance/advisory-guidance/stale-data-read-from-xapic.html
cc: ``@jethrogb``
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
`std::sys::windows::fill_utf16_buf`
|
|
Signed-off-by: Nick Cameron <nrc@ncameron.org>
|
|
Attempt to load all the required sync functions and fail if any one of them fails.
This reintroduces a macro for optional loading of functions but keeps it separate from the fallback macro rather than having that do two different jobs.
|
|
In order to mitigate the Stale Data Read for xAPIC vulnerability completely, reading userspace from an SGX enclave must be aligned and in 8-bytes chunks.
References:
- https://www.intel.com/content/www/us/en/security-center/advisory/intel-sa-00657.html
- https://www.intel.com/content/www/us/en/developer/articles/technical/software-security-guidance/advisory-guidance/stale-data-read-from-xapic.html
|
|
Update fortanix-sgx-abi to 0.5.0 to add support for cancel queue (see
https://github.com/fortanix/rust-sgx/pull/405 and
https://github.com/fortanix/rust-sgx/pull/404).
Export some useful traits for processing SGX usercall. This is needed
for https://github.com/fortanix/rust-sgx/pull/404 to avoid duplication.
|
|
|
|
|
|
|
|
|
|
|
|
Never inline Windows dtor access
Inlining can cause problem If used in a Rust dylib. See #44391.
r? `@Mark-Simulacrum`
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Fix HorizonOS regression in FileTimes
The changes in #98246 caused a regression for multiple Newlib-based systems. This is just a fix including HorizonOS to the list of targets which require a workaround.
``@AzureMarker`` ``@ian-h-chamberlain``
r? ``@nagisa``
|
|
|
|
avoid some int2ptr casts in thread_local_key tests
|
|
for linux and android
|
|
|
|
|
|
cleanup code w/ pointers in std a little
Use pointer methods (`byte_add`, `null_mut`, etc) to make code in std a little nicer.
|
|
Optimize thread ID generation
By using atomics where available, thread IDs can be generated without locking while still enforcing uniqueness.
|
|
promote debug_assert to assert when possible and useful
This PR fixed a very old issue https://github.com/rust-lang/rust/issues/94705 to clarify and improve the POSIX error checking, and some of the checks are skipped because can have no benefit, but I'm sure that this can open some interesting discussion.
Fixes https://github.com/rust-lang/rust/issues/94705
cc: `@tavianator`
cc: `@cuviper`
|
|
Add stability attributes to BacktraceStatus variants
Fixes #100399
|
|
provide correct size hint for unsupported platform `CommandArgs`
Split from https://github.com/rust-lang/rust/pull/99880#discussion_r932994172
|
|
add crt-static for android
|
|
Fixes #100399
|
|
linux: Use `pthread_setname_np` instead of `prctl`
This function is available on Linux since glibc 2.12, musl 1.1.16, and
uClibc 1.0.20. The main advantage over `prctl` is that it properly
represents the pointer argument, rather than a multi-purpose `long`,
so we're better representing strict provenance (#95496).
|
|
|
|
Replace pointer casting in hashmap_random_keys with safe code
The old code was unnecessarily unsafe and relied on the layout of tuples always being the same as an array of the same size (which might be bad with `-Z randomize-layout`)?
The replacement has [identical codegen](https://rust.godbolt.org/z/qxsvdb8nx), so it seems like a reasonable change.
|
|
Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
|
|
|