| Age | Commit message (Collapse) | Author | Lines |
|
clock_gettime support CLOCK_REALTIME/CLOCK_MONOTONIC clockid_t.
localtime_r is supported only tm struct is more limited than other
supported platforms.
|
|
offset: allow zero-byte offset on arbitrary pointers
As per prior `@rust-lang/opsem` [discussion](https://github.com/rust-lang/opsem-team/issues/10) and [FCP](https://github.com/rust-lang/unsafe-code-guidelines/issues/472#issuecomment-1793409130):
- Zero-sized reads and writes are allowed on all sufficiently aligned pointers, including the null pointer
- Inbounds-offset-by-zero is allowed on all pointers, including the null pointer
- `offset_from` on two pointers derived from the same allocation is always allowed when they have the same address
This removes surprising UB (in particular, even C++ allows "nullptr + 0", which we currently disallow), and it brings us one step closer to an important theoretical property for our semantics ("provenance monotonicity": if operations are valid on bytes without provenance, then adding provenance can't make them invalid).
The minimum LLVM we require (v17) includes https://reviews.llvm.org/D154051, so we can finally implement this.
The `offset_from` change is needed to maintain the equivalence with `offset`: if `let ptr2 = ptr1.offset(N)` is well-defined, then `ptr2.offset_from(ptr1)` should be well-defined and return N. Now consider the case where N is 0 and `ptr1` dangles: we want to still allow offset_from here.
I think we should change offset_from further, but that's a separate discussion.
Fixes https://github.com/rust-lang/rust/issues/65108
[Tracking issue](https://github.com/rust-lang/rust/issues/117945) | [T-lang summary](https://github.com/rust-lang/rust/pull/117329#issuecomment-1951981106)
Cc `@nikic`
|
|
|
|
|
|
|
|
Rollup of 7 pull requests
Successful merges:
- #124570 (Miscellaneous cleanups)
- #124772 (Refactor documentation for Apple targets)
- #125011 (Add opt-for-size core lib feature flag)
- #125218 (Migrate `run-make/no-intermediate-extras` to new `rmake.rs`)
- #125225 (Use functions from `crt_externs.h` on iOS/tvOS/watchOS/visionOS)
- #125266 (compiler: add simd_ctpop intrinsic)
- #125348 (Small fixes to `std::path::absolute` docs)
Failed merges:
- #125296 (Fix `unexpected_cfgs` lint on std)
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
compiler: add simd_ctpop intrinsic
Fairly straightforward addition.
cc `@rust-lang/opsem` new (extremely boring) intrinsic
|
|
|
|
|
|
|
|
- share implementation with miri_starting_unwind
- make test use a custom unwinding class
- extend comments
- use NeedsUnwind more consistently
|
|
Windows still needs the old custom ABI as SEH unwinding isn't supported
by miri. Unlike DWARF unwinding it preserves all stack frames until
right after the do_catch function has executed. Because of this
panic_unwind stack allocates the exception object. Miri can't currently
model unwinding without destroying stack frames and as such will report
a use-after-free of the exception object.
|
|
make basic things work on Android
Fixes https://github.com/rust-lang/miri/issues/3608
|
|
|
|
|
|
|
|
|
|
|
|
fixing part of `miri test alloc/hashmap`.
|
|
|
|
|
|
|
|
support `f*_algebraic`
supports the [`f*_algebraic`](https://doc.rust-lang.org/std/intrinsics/fn.fadd_algebraic.html) intrinsics.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
organize libc tests into a proper folder, and run some of them on Windows
|
|
|
|
|
|
reduce test_dependencies
Also add comments for why we need all these 3 random functions for Windows, and the old Linux syscall interface.
|
|
also add some comments for why we keep certain old obscure APIs supported
|
|
the actual target-specific things we want to test are all in getrandom,
and rand already tests miri itself
|
|
|
|
|
|
implementation across unices
|
|
illumos
|
|
|
|
missing foreign function
|
|
Rustup
|
|
|
|
|
|
|
|
add helper function to declare an extern static for a weak symbol
and use it to make `statx` a regular function and get rid of the syscall
|
|
|
|
document unofficially supported OSes
Also tweak the freeBSD testing a bit.
|