about summary refs log tree commit diff
path: root/library/std
AgeCommit message (Collapse)AuthorLines
2022-08-20Auto merge of #100810 - matthiaskrgr:rollup-xep778s, r=matthiaskrgrbors-35/+92
Rollup of 9 pull requests Successful merges: - #97963 (net listen backlog set to negative on Linux.) - #99935 (Reenable disabled early syntax gates as future-incompatibility lints) - #100129 (add miri-test-libstd support to libstd) - #100500 (Ban references to `Self` in trait object substs for projection predicates too.) - #100636 (Revert "Revert "Allow dynamic linking for iOS/tvOS targets."") - #100718 ([rustdoc] Fix item info display) - #100769 (Suggest adding a reference to a trait assoc item) - #100777 (elaborate how revisions work with FileCheck stuff in src/test/codegen) - #100796 (Refactor: remove unnecessary string searchings) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-08-20Rollup merge of #100129 - RalfJung:miri-test-libstd, r=thomccMatthias Krüger-33/+82
add miri-test-libstd support to libstd - The first commit mirrors what we already have in liballoc. - The second commit adds some regression tests that only really make sense to be run in Miri, since they rely on Miri's extra checks to detect anything. - The third commit makes the MPSC tests work in reasonable time in Miri by reducing iteration counts. - The fourth commit silences some warnings due to code being disabled with `cfg(miri)`
2022-08-20Rollup merge of #97963 - devnexen:net_listener_neg, r=the8472Matthias Krüger-2/+10
net listen backlog set to negative on Linux. it will be 4076 (from 5.4) or 128.
2022-08-20Rollup merge of #100710 - ChrisDenton:load-library, r=thomccMatthias Krüger-81/+93
Windows: Load synch functions together Attempt to load all the required sync functions and fail if any one of them fails. This fixes a FIXME by going back to optional loading of `WakeByAddressSingle`. Also reintroduces a macro for optional loading of functions but keeps it separate from the fallback macro rather than having that do two different jobs. r? `@thomcc`
2022-08-20Rollup merge of #100642 - mzohreva:mz/update-sgx-abi-cancel-queue, ↵Matthias Krüger-5/+32
r=Mark-Simulacrum Update fortanix-sgx-abi and export some useful SGX usercall traits 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. cc `@raoulstrackx` and `@jethrogb`
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-5/+32
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-15Optimize poison guards to ZSTs when panic=abortTyler Mandry-2/+49
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