about summary refs log tree commit diff
path: root/library/std/src/sys/pal/sgx/abi
AgeCommit message (Collapse)AuthorLines
2025-09-10std: move `thread` into `sys`joboet-1/+1
2025-07-26Rollup merge of #143272 - tgross35:bump-fortanix, r=jhpratt,jethrogbTrevor Gross-1/+1
Upgrade the `fortanix-sgx-abi` dependency 0.6.1 removes the `compiler-builtins` dependency, part of RUST-142265. The breaking change from 0.5 to 0.6 is for an update to the `insecure_time` API [1]. I validated that `./x c library --target x86_64-fortanix-unknown-sgx` completes successfully with this change. Link: https://github.com/fortanix/rust-sgx/commit/a34e9767f37d6585c18bdbd31cddcadc56670d57 [1]
2025-07-13Attempt to fix up SGX for random API updatesJosh Triplett-2/+2
2025-07-01Upgrade the `fortanix-sgx-abi` dependencyTrevor Gross-1/+1
0.6.1 removes the `compiler-builtins` dependency, part of RUST-142265. The breaking change from 0.5 to 0.6 is for an update to the `insecure_time` API [1]. I validated that `./x c library --target x86_64-fortanix-unknown-sgx` completes successfully with this change. Link: https://github.com/fortanix/rust-sgx/commit/a34e9767f37d6585c18bdbd31cddcadc56670d57 [1]
2025-04-28Auto merge of #123239 - Urgau:dangerous_implicit_autorefs, ↵bors-1/+1
r=jdonszelmann,traviscross Implement a lint for implicit autoref of raw pointer dereference - take 2 *[t-lang nomination comment](https://github.com/rust-lang/rust/pull/123239#issuecomment-2727551097)* This PR aims at implementing a lint for implicit autoref of raw pointer dereference, it is based on #103735 with suggestion and improvements from https://github.com/rust-lang/rust/pull/103735#issuecomment-1370420305. The goal is to catch cases like this, where the user probably doesn't realise it just created a reference. ```rust pub struct Test { data: [u8], } pub fn test_len(t: *const Test) -> usize { unsafe { (*t).data.len() } // this calls <[T]>::len(&self) } ``` Since #103735 already went 2 times through T-lang, where they T-lang ended-up asking for a more restricted version (which is what this PR does), I would prefer this PR to be reviewed first before re-nominating it for T-lang. ---- Compared to the PR it is as based on, this PR adds 3 restrictions on the outer most expression, which must either be: 1. A deref followed by any non-deref place projection (that intermediate deref will typically be auto-inserted) 2. A method call annotated with `#[rustc_no_implicit_refs]`. 3. A deref followed by a `addr_of!` or `addr_of_mut!`. See bottom of post for details. There are several points that are not 100% clear to me when implementing the modifications: - ~~"4. Any number of automatically inserted deref/derefmut calls." I as never able to trigger this. Am I missing something?~~ Fixed - Are "index" and "field" enough? ---- cc `@JakobDegen` `@WaffleLapkin` r? `@RalfJung` try-job: dist-various-1 try-job: dist-various-2
2025-04-27Fix SGX library code implicit auto-refUrgau-1/+1
2025-04-27use generic Atomic type where possibleChristopher Durham-12/+8
in core/alloc/std only for now, and ignoring test files Co-authored-by: Pavel Grigorenko <GrigorenkoPV@ya.ru>
2025-04-14Clarify why SGX code specifies linkage/symbol names for certain staticsJethro Beekman-2/+4
Also update the symbol names as items have moved around a bit. The actual name isn't that important, it just needs to be unique. But for debugging it can be useful for it to point to the right place.
2025-03-11Fix `UserRef<[T]>::copy_to_enclave_vec`Thalia Archibald-13/+6
It reinterprets uninitialized memory as initialized and does not drop existing elements of the Vec. Fix that. Additionally, make it more general by appending, instead of overwriting existing elements, and rename it to `append_to_enclave_vec`. A caller can simply call `.clear()` before, for the old behavior.
2025-03-10Implement read_buf and vectored read/write for SGX stdioThalia Archibald-1/+16
2025-03-10Copy from userspace to MaybeUninitJethro Beekman-3/+42
Co-authored-by: Thalia Archibald <thalia@archibald.dev>
2025-03-09std: move stdio to `sys`joboet-1/+1
As per #117276, this moves the platform definitions of `Stdout` and friends into `sys`. This PR also unifies the UNIX and Hermit implementations and moves the `__rust_print_err` function needed by libunwind on SGX into the dedicated module for such helper functions.
2025-03-06library: Use size_of from the prelude instead of importedThalia Archibald-23/+19
Use `std::mem::{size_of, size_of_val, align_of, align_of_val}` from the prelude instead of importing or qualifying them. These functions were added to all preludes in Rust 1.80.
2025-02-13std: Apply unsafe_attr_outside_unsafeEric Huss-5/+5
2025-02-09Mark extern blocks as unsafeMichael Goulet-7/+7
2024-09-23std: implement the `random` featurejoboet-2/+2
Implements the ACP https://github.com/rust-lang/libs-team/issues/393.
2024-09-22Reformat using the new identifier sorting from rustfmtMichael Goulet-1/+1
2024-07-31PinCoerceUnsized trait into coreXiangfei Ding-0/+4
2024-07-29Reformat `use` declarations.Nicholas Nethercote-13/+9
The previous commit updated `rustfmt.toml` appropriately. This commit is the outcome of running `x fmt --all` with the new formatting options.
2024-07-26Fix doc nitsJohn Arundel-8/+10
Many tiny changes to stdlib doc comments to make them consistent (for example "Returns foo", rather than "Return foo", per RFC1574), adding missing periods, paragraph breaks, backticks for monospace style, and other minor nits. https://github.com/rust-lang/rfcs/blob/master/text/1574-more-api-documentation-conventions.md#appendix-a-full-conventions-text
2024-07-15lib: replace some `mem::forget`'s with `ManuallyDrop`Pavel Grigorenko-6/+5
2024-02-24library: use `addr_of!`Pavel Grigorenko-1/+1
2024-02-15Replace `NonZero::<_>::new` with `NonZero::new`.Markus Reiter-7/+7
2024-02-15Use generic `NonZero` internally.Markus Reiter-12/+13
2024-01-11std: begin moving platform support modules into `pal`joboet-0/+2384