Skip to content

Commit 3e674b0

Browse files
committed
Auto merge of #141463 - matthiaskrgr:rollup-7k48ui3, r=matthiaskrgr
Rollup of 7 pull requests Successful merges: - #138896 (std: fix aliasing bug in UNIX process implementation) - #140832 (aarch64-linux: Default to FramePointer::NonLeaf) - #141065 (Updated std doctests for wasm) - #141369 (Simplify `format_integer_with_underscore_sep`) - #141374 (make shared_helpers exe function work for both cygwin and non-cygwin hosts) - #141398 (chore: fix typos in comment) - #141457 (Update mdbook to 0.4.50) Failed merges: - #141405 (GetUserProfileDirectoryW is now documented to always store the size) r? `@ghost` `@rustbot` modify labels: rollup
2 parents e88e854 + ae3b696 commit 3e674b0

File tree

21 files changed

+245
-236
lines changed

21 files changed

+245
-236
lines changed

compiler/rustc_target/src/spec/targets/aarch64_be_unknown_linux_gnu.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use rustc_abi::Endian;
22

3-
use crate::spec::{StackProbeType, Target, TargetMetadata, TargetOptions, base};
3+
use crate::spec::{FramePointer, StackProbeType, Target, TargetMetadata, TargetOptions, base};
44

55
pub(crate) fn target() -> Target {
66
Target {
@@ -16,6 +16,10 @@ pub(crate) fn target() -> Target {
1616
arch: "aarch64".into(),
1717
options: TargetOptions {
1818
features: "+v8a,+outline-atomics".into(),
19+
// the AAPCS64 expects use of non-leaf frame pointers per
20+
// https://github.com/ARM-software/abi-aa/blob/4492d1570eb70c8fd146623e0db65b2d241f12e7/aapcs64/aapcs64.rst#the-frame-pointer
21+
// and we tend to encounter interesting bugs in AArch64 unwinding code if we do not
22+
frame_pointer: FramePointer::NonLeaf,
1923
max_atomic_width: Some(128),
2024
stack_probes: StackProbeType::Inline,
2125
mcount: "\u{1}_mcount".into(),

compiler/rustc_target/src/spec/targets/aarch64_be_unknown_linux_gnu_ilp32.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use rustc_abi::Endian;
22

3-
use crate::spec::{StackProbeType, Target, TargetMetadata, TargetOptions, base};
3+
use crate::spec::{FramePointer, StackProbeType, Target, TargetMetadata, TargetOptions, base};
44

55
pub(crate) fn target() -> Target {
66
let mut base = base::linux_gnu::opts();
@@ -20,6 +20,10 @@ pub(crate) fn target() -> Target {
2020
options: TargetOptions {
2121
abi: "ilp32".into(),
2222
features: "+v8a,+outline-atomics".into(),
23+
// the AAPCS64 expects use of non-leaf frame pointers per
24+
// https://github.com/ARM-software/abi-aa/blob/4492d1570eb70c8fd146623e0db65b2d241f12e7/aapcs64/aapcs64.rst#the-frame-pointer
25+
// and we tend to encounter interesting bugs in AArch64 unwinding code if we do not
26+
frame_pointer: FramePointer::NonLeaf,
2327
stack_probes: StackProbeType::Inline,
2428
mcount: "\u{1}_mcount".into(),
2529
endian: Endian::Big,

compiler/rustc_target/src/spec/targets/aarch64_linux_android.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
use crate::spec::{SanitizerSet, StackProbeType, Target, TargetMetadata, TargetOptions, base};
1+
use crate::spec::{
2+
FramePointer, SanitizerSet, StackProbeType, Target, TargetMetadata, TargetOptions, base,
3+
};
24

35
// See https://developer.android.com/ndk/guides/abis.html#arm64-v8a
46
// for target ABI requirements.
@@ -20,6 +22,10 @@ pub(crate) fn target() -> Target {
2022
// As documented in https://developer.android.com/ndk/guides/cpu-features.html
2123
// the neon (ASIMD) and FP must exist on all android aarch64 targets.
2224
features: "+v8a,+neon,+fp-armv8".into(),
25+
// the AAPCS64 expects use of non-leaf frame pointers per
26+
// https://github.com/ARM-software/abi-aa/blob/4492d1570eb70c8fd146623e0db65b2d241f12e7/aapcs64/aapcs64.rst#the-frame-pointer
27+
// and we tend to encounter interesting bugs in AArch64 unwinding code if we do not
28+
frame_pointer: FramePointer::NonLeaf,
2329
stack_probes: StackProbeType::Inline,
2430
supported_sanitizers: SanitizerSet::CFI
2531
| SanitizerSet::HWADDRESS

compiler/rustc_target/src/spec/targets/aarch64_unknown_linux_gnu.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
use crate::spec::{SanitizerSet, StackProbeType, Target, TargetMetadata, TargetOptions, base};
1+
use crate::spec::{
2+
FramePointer, SanitizerSet, StackProbeType, Target, TargetMetadata, TargetOptions, base,
3+
};
24

35
pub(crate) fn target() -> Target {
46
Target {
@@ -14,6 +16,10 @@ pub(crate) fn target() -> Target {
1416
arch: "aarch64".into(),
1517
options: TargetOptions {
1618
features: "+v8a,+outline-atomics".into(),
19+
// the AAPCS64 expects use of non-leaf frame pointers per
20+
// https://github.com/ARM-software/abi-aa/blob/4492d1570eb70c8fd146623e0db65b2d241f12e7/aapcs64/aapcs64.rst#the-frame-pointer
21+
// and we tend to encounter interesting bugs in AArch64 unwinding code if we do not
22+
frame_pointer: FramePointer::NonLeaf,
1723
mcount: "\u{1}_mcount".into(),
1824
max_atomic_width: Some(128),
1925
stack_probes: StackProbeType::Inline,

compiler/rustc_target/src/spec/targets/aarch64_unknown_linux_gnu_ilp32.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use crate::spec::{StackProbeType, Target, TargetMetadata, TargetOptions, base};
1+
use crate::spec::{FramePointer, StackProbeType, Target, TargetMetadata, TargetOptions, base};
22

33
pub(crate) fn target() -> Target {
44
Target {
@@ -15,6 +15,10 @@ pub(crate) fn target() -> Target {
1515
options: TargetOptions {
1616
abi: "ilp32".into(),
1717
features: "+v8a,+outline-atomics".into(),
18+
// the AAPCS64 expects use of non-leaf frame pointers per
19+
// https://github.com/ARM-software/abi-aa/blob/4492d1570eb70c8fd146623e0db65b2d241f12e7/aapcs64/aapcs64.rst#the-frame-pointer
20+
// and we tend to encounter interesting bugs in AArch64 unwinding code if we do not
21+
frame_pointer: FramePointer::NonLeaf,
1822
max_atomic_width: Some(128),
1923
stack_probes: StackProbeType::Inline,
2024
mcount: "\u{1}_mcount".into(),

compiler/rustc_target/src/spec/targets/aarch64_unknown_linux_musl.rs

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
use crate::spec::{SanitizerSet, StackProbeType, Target, TargetMetadata, TargetOptions, base};
1+
use crate::spec::{
2+
FramePointer, SanitizerSet, StackProbeType, Target, TargetMetadata, TargetOptions, base,
3+
};
24

35
pub(crate) fn target() -> Target {
46
let mut base = base::linux_musl::opts();
@@ -26,6 +28,12 @@ pub(crate) fn target() -> Target {
2628
pointer_width: 64,
2729
data_layout: "e-m:e-p270:32:32-p271:32:32-p272:64:64-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128-Fn32".into(),
2830
arch: "aarch64".into(),
29-
options: TargetOptions { mcount: "\u{1}_mcount".into(), ..base },
31+
options: TargetOptions {
32+
// the AAPCS64 expects use of non-leaf frame pointers per
33+
// https://github.com/ARM-software/abi-aa/blob/4492d1570eb70c8fd146623e0db65b2d241f12e7/aapcs64/aapcs64.rst#the-frame-pointer
34+
// and we tend to encounter interesting bugs in AArch64 unwinding code if we do not
35+
frame_pointer: FramePointer::NonLeaf,
36+
mcount: "\u{1}_mcount".into(), ..base
37+
},
3038
}
3139
}

compiler/rustc_target/src/spec/targets/aarch64_unknown_linux_ohos.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
use crate::spec::{SanitizerSet, StackProbeType, Target, TargetMetadata, TargetOptions, base};
1+
use crate::spec::{
2+
FramePointer, SanitizerSet, StackProbeType, Target, TargetMetadata, TargetOptions, base,
3+
};
24

35
pub(crate) fn target() -> Target {
46
let mut base = base::linux_ohos::opts();
@@ -16,6 +18,10 @@ pub(crate) fn target() -> Target {
1618
data_layout: "e-m:e-p270:32:32-p271:32:32-p272:64:64-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128-Fn32".into(),
1719
arch: "aarch64".into(),
1820
options: TargetOptions {
21+
// the AAPCS64 expects use of non-leaf frame pointers per
22+
// https://github.com/ARM-software/abi-aa/blob/4492d1570eb70c8fd146623e0db65b2d241f12e7/aapcs64/aapcs64.rst#the-frame-pointer
23+
// and we tend to encounter interesting bugs in AArch64 unwinding code if we do not
24+
frame_pointer: FramePointer::NonLeaf,
1925
mcount: "\u{1}_mcount".into(),
2026
stack_probes: StackProbeType::Inline,
2127
supported_sanitizers: SanitizerSet::ADDRESS

library/core/src/hint.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ pub const unsafe fn assert_unchecked(cond: bool) {
231231
///
232232
/// # Examples
233233
///
234-
/// ```
234+
/// ```ignore-wasm
235235
/// use std::sync::atomic::{AtomicBool, Ordering};
236236
/// use std::sync::Arc;
237237
/// use std::{hint, thread};

library/core/src/sync/atomic.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@
193193
//!
194194
//! A simple spinlock:
195195
//!
196-
//! ```
196+
//! ```ignore-wasm
197197
//! use std::sync::Arc;
198198
//! use std::sync::atomic::{AtomicUsize, Ordering};
199199
//! use std::{hint, thread};
@@ -622,7 +622,7 @@ impl AtomicBool {
622622
///
623623
/// # Examples
624624
///
625-
/// ```
625+
/// ```ignore-wasm
626626
/// #![feature(atomic_from_mut)]
627627
/// use std::sync::atomic::{AtomicBool, Ordering};
628628
///
@@ -653,7 +653,7 @@ impl AtomicBool {
653653
///
654654
/// # Examples
655655
///
656-
/// ```
656+
/// ```rust,ignore-wasm
657657
/// #![feature(atomic_from_mut)]
658658
/// use std::sync::atomic::{AtomicBool, Ordering};
659659
///
@@ -1548,7 +1548,7 @@ impl<T> AtomicPtr<T> {
15481548
///
15491549
/// # Examples
15501550
///
1551-
/// ```
1551+
/// ```ignore-wasm
15521552
/// #![feature(atomic_from_mut)]
15531553
/// use std::ptr::null_mut;
15541554
/// use std::sync::atomic::{AtomicPtr, Ordering};
@@ -1585,7 +1585,7 @@ impl<T> AtomicPtr<T> {
15851585
///
15861586
/// # Examples
15871587
///
1588-
/// ```
1588+
/// ```ignore-wasm
15891589
/// #![feature(atomic_from_mut)]
15901590
/// use std::ptr::null_mut;
15911591
/// use std::sync::atomic::{AtomicPtr, Ordering};
@@ -2692,7 +2692,7 @@ macro_rules! atomic_int {
26922692
///
26932693
/// # Examples
26942694
///
2695-
/// ```
2695+
/// ```ignore-wasm
26962696
/// #![feature(atomic_from_mut)]
26972697
#[doc = concat!($extra_feature, "use std::sync::atomic::{", stringify!($atomic_type), ", Ordering};")]
26982698
///
@@ -2725,7 +2725,7 @@ macro_rules! atomic_int {
27252725
///
27262726
/// # Examples
27272727
///
2728-
/// ```
2728+
/// ```ignore-wasm
27292729
/// #![feature(atomic_from_mut)]
27302730
#[doc = concat!($extra_feature, "use std::sync::atomic::{", stringify!($atomic_type), ", Ordering};")]
27312731
///

library/std/src/sync/mpmc/list.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -575,7 +575,7 @@ impl<T> Channel<T> {
575575
// After this point `head.block` is not modified again and it will be deallocated if it's
576576
// non-null. The `Drop` code of the channel, which runs after this function, also attempts
577577
// to deallocate `head.block` if it's non-null. Therefore this function must maintain the
578-
// invariant that if a deallocation of head.block is attemped then it must also be set to
578+
// invariant that if a deallocation of head.block is attempted then it must also be set to
579579
// NULL. Failing to do so will lead to the Drop code attempting a double free. For this
580580
// reason both reads above do an atomic swap instead of a simple atomic load.
581581

0 commit comments

Comments
 (0)