rust/library
Dylan DPC 48ebad58b2
Rollup merge of #83065 - CDirkx:win-alloc, r=dtolnay
Rework `std::sys::windows::alloc`

I came across https://github.com/rust-lang/rust/pull/76676#discussion_r488729990, which points out that there was unsound code in the Windows alloc code, creating a &mut to possibly uninitialized memory. I reworked the code so that that particular issue does not occur anymore, and started adding more documentation and safety comments.

Full list of changes:
 - moved and documented the relevant Windows Heap API functions
 - refactor `allocate_with_flags` to `allocate` (and remove the other helper functions), which now takes just a `bool` if the memory should be zeroed
 - add checks for if `GetProcessHeap` returned null
 - add a test that checks if the size and alignment of a `Header` are indeed <= `MIN_ALIGN`
 - add `#![deny(unsafe_op_in_unsafe_fn)]` and the necessary unsafe blocks with safety comments

I feel like I may have overdone the documenting, the unsoundness fix is the most important part; I could spit this PR up in separate parts.
2021-04-02 19:57:28 +02:00
..
alloc panic early when TrustedLen indicates a length > usize::MAX 2021-03-31 23:09:28 +02:00
backtrace@af078ecc0b
core Auto merge of #80965 - camelid:rename-doc-spotlight, r=jyn514 2021-04-02 07:04:58 +00:00
panic_abort
panic_unwind Revert "Revert stabilizing integer::BITS." 2021-03-24 22:34:36 +01:00
proc_macro
profiler_builtins Update the minimum external LLVM to 10 2021-03-22 11:33:43 -07:00
rtstartup
rustc-std-workspace-alloc
rustc-std-workspace-core
rustc-std-workspace-std
std Rollup merge of #83065 - CDirkx:win-alloc, r=dtolnay 2021-04-02 19:57:28 +02:00
stdarch@9c732a56f6
term
test lazily calls some fns 2021-03-27 10:20:32 +03:00
unwind Rollup merge of #82374 - clehner:licenses, r=joshtriplett 2021-03-22 15:21:23 +01:00