Skip to content

Commit 50b68d9

Browse files
committed
Auto merge of rust-lang#144490 - tgross35:rollup-ps0utme, r=tgross35
Rollup of 9 pull requests Successful merges: - rust-lang#140871 (Don't lint against named labels in `naked_asm!`) - rust-lang#141663 (rustdoc: add ways of collapsing all impl blocks) - rust-lang#143272 (Upgrade the `fortanix-sgx-abi` dependency) - rust-lang#143585 (`loop_match`: suggest extracting to a `const` item) - rust-lang#143698 (Fix unused_parens false positive) - rust-lang#143859 (Guarantee 8 bytes of alignment in Thread::into_raw) - rust-lang#144160 (tests: debuginfo: Work around or disable broken tests on powerpc) - rust-lang#144412 (Small cleanup: Use LocalKey<Cell> methods more) - rust-lang#144431 (Disable has_reliable_f128_math on musl targets) r? `@ghost` `@rustbot` modify labels: rollup
2 parents b671d55 + e332572 commit 50b68d9

File tree

4 files changed

+11
-6
lines changed

4 files changed

+11
-6
lines changed

Cargo.lock

Lines changed: 2 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

std/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ rand_xorshift = "0.4.0"
6666
dlmalloc = { version = "0.2.10", features = ['rustc-dep-of-std'] }
6767

6868
[target.x86_64-fortanix-unknown-sgx.dependencies]
69-
fortanix-sgx-abi = { version = "0.5.0", features = [
69+
fortanix-sgx-abi = { version = "0.6.1", features = [
7070
'rustc-dep-of-std',
7171
], public = true }
7272

std/src/sys/pal/sgx/abi/usercalls/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ pub fn send(event_set: u64, tcs: Option<Tcs>) -> IoResult<()> {
267267
/// Usercall `insecure_time`. See the ABI documentation for more information.
268268
#[unstable(feature = "sgx_platform", issue = "56975")]
269269
pub fn insecure_time() -> Duration {
270-
let t = unsafe { raw::insecure_time() };
270+
let t = unsafe { raw::insecure_time().0 };
271271
Duration::new(t / 1_000_000_000, (t % 1_000_000_000) as _)
272272
}
273273

std/src/thread/mod.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1399,6 +1399,11 @@ where
13991399
}
14001400

14011401
/// The internal representation of a `Thread` handle
1402+
///
1403+
/// We explicitly set the alignment for our guarantee in Thread::into_raw. This
1404+
/// allows applications to stuff extra metadata bits into the alignment, which
1405+
/// can be rather useful when working with atomics.
1406+
#[repr(align(8))]
14021407
struct Inner {
14031408
name: Option<ThreadNameString>,
14041409
id: ThreadId,
@@ -1582,7 +1587,8 @@ impl Thread {
15821587
/// Consumes the `Thread`, returning a raw pointer.
15831588
///
15841589
/// To avoid a memory leak the pointer must be converted
1585-
/// back into a `Thread` using [`Thread::from_raw`].
1590+
/// back into a `Thread` using [`Thread::from_raw`]. The pointer is
1591+
/// guaranteed to be aligned to at least 8 bytes.
15861592
///
15871593
/// # Examples
15881594
///

0 commit comments

Comments
 (0)