about summary refs log tree commit diff
path: root/library/std/src
AgeCommit message (Collapse)AuthorLines
2022-08-20Rollup merge of #99544 - dylni:expose-utf8lossy, r=Mark-SimulacrumMatthias Krüger-17/+32
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
2022-08-20Expose `Utf8Lossy` as `Utf8Chunks`dylni-17/+32
2022-08-20Rollup merge of #100729 - thomcc:less-initialized, r=ChrisDentonMatthias Krüger-5/+13
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`
2022-08-20Rollup merge of #100383 - fortanix:raoul/aepic_leak_mitigation, r=cuviperMatthias Krüger-23/+166
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``
2022-08-20Use const instead of staticChris Denton-3/+3
2022-08-20Simplify load/storeChris Denton-6/+3
2022-08-19Align android `sigaddset` impl with the reference impl from BionicThom Chiovoloni-3/+23
2022-08-19use <[u8]>::escape_ascii instead of core::ascii::escape_defaultKaDiWa-14/+2
2022-08-19Fix comment typoThom Chiovoloni-1/+1
2022-08-18clarify lib.rs attribute structureRalf Jung-10/+13
2022-08-18silence some unused-fn warnings in miri std buildsRalf Jung-0/+2
2022-08-18make many std tests work in MiriRalf Jung-30/+47
2022-08-18add some Miri-only testsRalf Jung-0/+19
2022-08-18add miri-test-libstd support to libstdRalf Jung-0/+8
2022-08-18Avoid zeroing a 1kb stack buffer on every call to ↵Thom Chiovoloni-5/+13
`std::sys::windows::fill_utf16_buf`
2022-08-18Address reviewer commentsNick Cameron-55/+74
Signed-off-by: Nick Cameron <nrc@ncameron.org>
2022-08-18Windows: Load synch functions togetherChris Denton-79/+94
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.
2022-08-17Mitigate Stale Data Read for xAPIC vulnerabilityRaoul Strackx-7/+137
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
2022-08-16Update fortanix-sgx-abi and export some useful SGX usercall traitsMohsen Zohrevandi-4/+31
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.
2022-08-16Simplify `IpDisplayBuffer` API.Markus Reiter-6/+10
2022-08-16Use `MaybeUninit<u8>` for `IpDisplayBuffer`.Markus Reiter-6/+14
2022-08-16Move `IpDisplayBuffer` into submodule.Markus Reiter-32/+36
2022-08-16Add `IpDisplayBuffer` helper struct.Markus Reiter-31/+48
2022-08-16Refactor copying data to userspaceRaoul Strackx-19/+32
2022-08-15Auto merge of #100007 - ChrisDenton:dtor-inline-never, r=michaelwoeristerbors-0/+4
Never inline Windows dtor access Inlining can cause problem If used in a Rust dylib. See #44391. r? `@Mark-Simulacrum`
2022-08-15Semicolon after macro_rules definition.Orson Peters-2/+2
2022-08-15Float biteq macros can be unused if test is skipped.Orson Peters-0/+2
2022-08-15Skip next_up/down tests entirely on x87.Orson Peters-112/+114
2022-08-15Conditionally do not compile NaN roundtrip tests on x87 fp.Orson Peters-44/+44
2022-08-15Ensure NaN references values go through function boundary for next_up/down.Orson Peters-12/+36
2022-08-15Fixed float next_up/down 32-bit x87 float NaN roundtrip test case.Orson Peters-24/+24
2022-08-15Added next_up and next_down for f32/f64.Orson Peters-0/+127
2022-08-14Rollup merge of #100249 - Meziu:master, r=joshtriplettMatthias Krüger-5/+5
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``
2022-08-14Add mention of `BufReader` in `Read::bytes` docsJakub Dąbek-1/+6
2022-08-13Rollup merge of #100407 - RalfJung:no-int2ptr, r=Mark-SimulacrumMichael Goulet-4/+5
avoid some int2ptr casts in thread_local_key tests
2022-08-13created tcpstream quickack traitBerend-Jan Lange-2/+138
for linux and android
2022-08-12Apply changes from rustfmt bumpMark Rousskov-1/+1
2022-08-12Adjust cfgsMark Rousskov-12/+10
2022-08-12Rollup merge of #100030 - WaffleLapkin:nice_pointer_sis, r=scottmcmDylan DPC-4/+5
cleanup code w/ pointers in std a little Use pointer methods (`byte_add`, `null_mut`, etc) to make code in std a little nicer.
2022-08-12Rollup merge of #100022 - joboet:faster_threadid, r=joshtriplettDylan DPC-18/+41
Optimize thread ID generation By using atomics where available, thread IDs can be generated without locking while still enforcing uniqueness.
2022-08-12Auto merge of #99624 - vincenzopalazzo:macros/unix_error, r=Amanieubors-2/+6
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`
2022-08-11Rollup merge of #100418 - tbodt:stabilize-backtrace, r=dtolnayMatthias Krüger-0/+3
Add stability attributes to BacktraceStatus variants Fixes #100399
2022-08-11Rollup merge of #100203 - compiler-errors:command-args-size-hint, r=m-ou-seMatthias Krüger-0/+3
provide correct size hint for unsupported platform `CommandArgs` Split from https://github.com/rust-lang/rust/pull/99880#discussion_r932994172
2022-08-11Rollup merge of #99421 - Bryanskiy:android-crt-static, r=petrochenkovMatthias Krüger-2/+5
add crt-static for android
2022-08-11Add stability attributes to BacktraceStatus variantsTheodore Dubois-0/+3
Fixes #100399
2022-08-11Rollup merge of #100287 - cuviper:no-linux-prctl, r=Mark-SimulacrumDylan DPC-3/+9
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).
2022-08-11avoid some int2ptr casts in thread_local_key testsRalf Jung-4/+5
2022-08-11Auto merge of #100298 - BlackHoleFox:hashmap_keygen_cleanup, r=Mark-Simulacrumbors-9/+9
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.
2022-08-11promote debug_assert to assertVincenzo Palazzo-2/+6
Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
2022-08-10add crt-static for androidBryanskiy-2/+5