about summary refs log tree commit diff
path: root/compiler/rustc_parse/src/errors.rs
diff options
context:
space:
mode:
authorStuart Cook <Zalathar@users.noreply.github.com>2025-08-19 14:18:21 +1000
committerGitHub <noreply@github.com>2025-08-19 14:18:21 +1000
commitd0fa5c7af7b1f5d2abd4e7898baa7c15a6a09daa (patch)
tree0061e3c582707e47b85014fe11550cb7f09f7564 /compiler/rustc_parse/src/errors.rs
parentcff7ed1e21118fe162a35b575e11a5412d27d392 (diff)
parent3a993a611c9f32e34e341794ce19026ad3df2c0f (diff)
downloadrust-d0fa5c7af7b1f5d2abd4e7898baa7c15a6a09daa.tar.gz
rust-d0fa5c7af7b1f5d2abd4e7898baa7c15a6a09daa.zip
Rollup merge of #144960 - raoulstrackx:raoul/rte-513-disable_sleep_tests_on_sgx, r=Mark-Simulacrum
[RTE-513] Ignore sleep_until test on SGX

rust-lang/rust#141829 added a test for `sleep_until`: it checks whether its specification holds:
> Puts the current thread to sleep until the specified deadline has passed.

but in SGX there's no secure time source. There's only the ability to request the `insecure_time` from outside of the enclave through a [usercall](https://github.com/fortanix/rust-sgx/blob/master/intel-sgx/fortanix-sgx-abi/src/lib.rs#L590-L592) and the ability to [wait](https://github.com/rust-lang/rust/blob/master/library/std/src/sys/pal/sgx/abi/usercalls/mod.rs#L173-L179) for a certain event or timeout. But both are under the control of an attacker; users should not depend on the accuracy nor correctness of this time. We try to even enforce this by adding a +/-10% time interval to wait usercalls.

The current `thread::sleep_until` implementation uses this `wait` usercall. When a negative randomization interval is added to the timeout passed in `wait`, the test fails. As users should not rely on the correctness of any time inside the enclave, it should be considered an incorrect test on SGX. This PR ignores this test.
Diffstat (limited to 'compiler/rustc_parse/src/errors.rs')
0 files changed, 0 insertions, 0 deletions