about summary refs log tree commit diff
path: root/src/tools/miri/tests
AgeCommit message (Collapse)AuthorLines
2024-05-22solaris/illumos localtime_r / clock_getime support enabled.David Carlier-2/+3
clock_gettime support CLOCK_REALTIME/CLOCK_MONOTONIC clockid_t. localtime_r is supported only tm struct is more limited than other supported platforms.
2024-05-22Auto merge of #117329 - RalfJung:offset-by-zero, r=oli-obk,scottmcmbors-327/+64
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`
2024-05-22Merge from rustcRalf Jung-3/+18
2024-05-21don't inhibit random field reordering on repr(packed(1))Ralf Jung-2/+2
2024-05-21interpret: make overflowing binops just normal binopsRalf Jung-24/+24
2024-05-21Auto merge of #125358 - matthiaskrgr:rollup-mx841tg, r=matthiaskrgrbors-0/+15
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
2024-05-21Rollup merge of #125266 - workingjubilee:stream-plastic-love, r=RalfJung,nikicMatthias Krüger-0/+15
compiler: add simd_ctpop intrinsic Fairly straightforward addition. cc `@rust-lang/opsem` new (extremely boring) intrinsic
2024-05-20Fix miri tooMichael Goulet-3/+3
2024-05-20Use `throw_unsup_format` instead of returning `ENOTSUP` in the mmap shimmarc0246-30/+0
2024-05-19miri: support simd_ctpopJubilee Young-0/+15
2024-05-19various small nitsRalf Jung-15/+16
- share implementation with miri_starting_unwind - make test use a custom unwinding class - extend comments - use NeedsUnwind more consistently
2024-05-19Directly implement native exception raise methods in miribjorn3-0/+95
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.
2024-05-19Auto merge of #3616 - RalfJung:android, r=RalfJungbors-17/+25
make basic things work on Android Fixes https://github.com/rust-lang/miri/issues/3608
2024-05-19make basic things work on AndroidRalf Jung-17/+25
2024-05-19a bit of refactoring and tweak the aligned-allocation testsRalf Jung-54/+56
2024-05-18support aligned_alloc for unixes support.David Carlier-0/+70
2024-05-16alloc now works on wasi (and some formatting)Ralf Jung-2/+7
2024-05-13offset, offset_from: allow zero-byte offset on arbitrary pointersRalf Jung-327/+64
2024-05-12further illumos/solaris support.David Carlier-1/+6
fixing part of `miri test alloc/hashmap`.
2024-05-12merge two integer testsRalf Jung-58/+61
2024-05-12merge float tests into oneRalf Jung-66/+67
2024-05-12Add non-null pointer for posix_memaligntiif-4/+67
2024-05-11Auto merge of #3596 - bend-n:support_fstar_algebraic, r=RalfJungbors-0/+32
support `f*_algebraic` supports the [`f*_algebraic`](https://doc.rust-lang.org/std/intrinsics/fn.fadd_algebraic.html) intrinsics.
2024-05-11support `f*_algebraic`bendn-0/+32
2024-05-11Merge from rustcThe Miri Cronjob Bot-28/+64
2024-05-10rename 'extern-so' to 'native-lib'Ralf Jung-15/+15
2024-05-09interpret/miri: better errors on failing offset_fromRalf Jung-0/+36
2024-05-09do not run symlink tests on Windows hostsRalf Jung-150/+151
2024-05-09Implement non-null pointer for malloc(0)tiif-5/+61
2024-05-08Use generic `NonZero`.Markus Reiter-28/+28
2024-05-08miri: rename intrinsic_fallback_checks_ub to intrinsic_fallback_is_specRalf Jung-15/+15
2024-05-06Auto merge of #3579 - RalfJung:libc, r=RalfJungbors-204/+207
organize libc tests into a proper folder, and run some of them on Windows
2024-05-06organize libc tests into a proper folder, and run some of them on WindowsRalf Jung-204/+207
2024-05-06Implement wcslenAsger Hautop Drewsen-0/+20
2024-05-05Auto merge of #3574 - RalfJung:deps, r=RalfJungbors-24/+2
reduce test_dependencies Also add comments for why we need all these 3 random functions for Windows, and the old Linux syscall interface.
2024-05-05getrandom: test with and without isolationRalf Jung-1/+2
also add some comments for why we keep certain old obscure APIs supported
2024-05-05remove rand testRalf Jung-23/+0
the actual target-specific things we want to test are all in getrandom, and rand already tests miri itself
2024-05-05solaris support start.David Carlier-2/+2
2024-05-05hello: also ensure stderr worksRalf Jung-0/+2
2024-05-05move randomness tests into a single file and share the getrandom ↵Ralf Jung-57/+23
implementation across unices
2024-05-05move things out of libc-misc that have a better home; make libc-misc work on ↵Ralf Jung-361/+353
illumos
2024-05-05pthread shims: reorganize field offset handlingRalf Jung-0/+1
2024-05-04only show the 'basic API common for this target' message when this is a ↵Ralf Jung-32/+15
missing foreign function
2024-05-04Auto merge of #3561 - RalfJung:rustup, r=RalfJungbors-0/+29
Rustup
2024-05-04bless and fmtRalf Jung-1/+2
2024-05-04Merge from rustcRalf Jung-0/+28
2024-05-04also test pthread_condattr_getclockRalf Jung-1/+26
2024-05-04Auto merge of #3559 - RalfJung:weak-extern-static, r=RalfJungbors-6/+7
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
2024-05-04make statx a regular function (so we don't need to support the syscall)Ralf Jung-6/+7
2024-05-04Auto merge of #3554 - RalfJung:freebsd, r=RalfJungbors-10/+6
document unofficially supported OSes Also tweak the freeBSD testing a bit.