about summary refs log tree commit diff
path: root/src/tools/miri
AgeCommit message (Collapse)AuthorLines
2024-10-28Merge pull request #3992 from YohDeadfall/android-syscallRalf Jung-70/+93
Android: Added syscall support
2024-10-28Android: Added syscall supportYoh Deadfall-70/+93
2024-10-28Merge pull request #3954 from Mandragorian/coverage-reportRalf Jung-11/+173
Add option for generating coverage reports
2024-10-27Add option for generating coverage reportsKonstantin Andrikopoulos-11/+173
Add a `--coverage` option in the `test` subcommand of the miri script. This option, when set, will generate a coverage report after running the tests. `cargo-binutils` is needed as a dependency to generate the reports.
2024-10-27Merge pull request #3987 from TDecking/vpclmulRalf Jung-38/+249
Implement LLVM x86 vpclmulqdq intrinsics
2024-10-26Merge pull request #3995 from RalfJung/readdir_rOli Scherer-26/+16
fix error returned from readdir_r when isolation is enabled, and uses of raw_os_error
2024-10-26Adjust the vpclmulqdq test caseTobias Decking-3/+7
2024-10-26Implement LLVM x86 vpclmulqdq intrinsicsTobias Decking-38/+245
2024-10-26do not set the file type to an error codeRalf Jung-1/+4
2024-10-26do not use host 'raw_os_error' to compute target error codeRalf Jung-24/+11
2024-10-26fix error returned from readdir_r when isolation is enabledRalf Jung-2/+2
2024-10-26Merge pull request #3993 from RalfJung/dir-entry-drop-explicitRalf Jung-2/+5
indicate more explicitly where we close host file/dir handles
2024-10-26automatic PR: explain how to trigger CIRalf Jung-1/+1
2024-10-26indicate more explicitly where we close host file/dir handlesRalf Jung-2/+5
2024-10-25Merge pull request #3989 from RalfJung/ciRalf Jung-4/+5
CI workflow: tweak conclusion job
2024-10-25some more opportunities for set_last_error_and_returnRalf Jung-14/+7
2024-10-25get rid of fd_not_found; improve error handling in FileMetadataRalf Jung-71/+54
2024-10-25CI workflow: tweak conclusion jobRalf Jung-4/+5
2024-10-25Clear more `eval_libc` errors from unix shimsNoah Bright-53/+28
2024-10-22Merge pull request #3981 from Kobzol/ci-merge-queueMarco Ieni-23/+16
Switch CI to merge queues
2024-10-22Switch CI to merge queuesJakub Beránek-23/+16
2024-10-22Auto merge of #3982 - RalfJung:epoll_ctl, r=RalfJungbors-11/+4
epoll_ctl: throw unsupported error on unsupported opcode `@tiif` this is a somewhat suspicious "return -1" without setting the `errno` -- what is the reasoning behind that? Throwing a clear error seems better to me.
2024-10-22fmtThe Miri Cronjob Bot-8/+4
2024-10-22Merge from rustcThe Miri Cronjob Bot-43/+8
2024-10-22Preparing for merge from rustcThe Miri Cronjob Bot-1/+1
2024-10-21Rollup merge of #130350 - RalfJung:strict-provenance, r=dtolnayMatthias Krüger-38/+4
stabilize Strict Provenance and Exposed Provenance APIs Given that [RFC 3559](https://rust-lang.github.io/rfcs/3559-rust-has-provenance.html) has been accepted, t-lang has approved the concept of provenance to exist in the language. So I think it's time that we stabilize the strict provenance and exposed provenance APIs, and discuss provenance explicitly in the docs: ```rust // core::ptr pub const fn without_provenance<T>(addr: usize) -> *const T; pub const fn dangling<T>() -> *const T; pub const fn without_provenance_mut<T>(addr: usize) -> *mut T; pub const fn dangling_mut<T>() -> *mut T; pub fn with_exposed_provenance<T>(addr: usize) -> *const T; pub fn with_exposed_provenance_mut<T>(addr: usize) -> *mut T; impl<T: ?Sized> *const T { pub fn addr(self) -> usize; pub fn expose_provenance(self) -> usize; pub fn with_addr(self, addr: usize) -> Self; pub fn map_addr(self, f: impl FnOnce(usize) -> usize) -> Self; } impl<T: ?Sized> *mut T { pub fn addr(self) -> usize; pub fn expose_provenance(self) -> usize; pub fn with_addr(self, addr: usize) -> Self; pub fn map_addr(self, f: impl FnOnce(usize) -> usize) -> Self; } impl<T: ?Sized> NonNull<T> { pub fn addr(self) -> NonZero<usize>; pub fn with_addr(self, addr: NonZero<usize>) -> Self; pub fn map_addr(self, f: impl FnOnce(NonZero<usize>) -> NonZero<usize>) -> Self; } ``` I also did a pass over the docs to adjust them, because this is no longer an "experiment". The `ptr` docs now discuss the concept of provenance in general, and then they go into the two families of APIs for dealing with provenance: Strict Provenance and Exposed Provenance. I removed the discussion of how pointers also have an associated "address space" -- that is not actually tracked in the pointer value, it is tracked in the type, so IMO it just distracts from the core point of provenance. I also adjusted the docs for `with_exposed_provenance` to make it clear that we cannot guarantee much about this function, it's all best-effort. There are two unstable lints associated with the strict_provenance feature gate; I moved them to a new [strict_provenance_lints](https://github.com/rust-lang/rust/issues/130351) feature since I didn't want this PR to have an even bigger FCP. ;) `@rust-lang/opsem` Would be great to get some feedback on the docs here. :) Nominating for `@rust-lang/libs-api.` Part of https://github.com/rust-lang/rust/issues/95228. [FCP comment](https://github.com/rust-lang/rust/pull/130350#issuecomment-2395114536)
2024-10-21epoll_ctl: throw unsupported error on unsupported opcodeRalf Jung-11/+4
2024-10-21Auto merge of #3899 - YohDeadfall:prctl-thread-name, r=RalfJungbors-7/+185
Android: Added support for prctl handling thread names Addresses the first part of #3618.
2024-10-21move strict provenance lints to new feature gate, remove old feature gatesRalf Jung-38/+4
2024-10-21Auto merge of #3941 - noahmbright:unix_shims, r=oli-obkbors-74/+42
Replace set_last_error with set_last_error_and_return Took care of the simple patterns. Other patterns involved setting an error and then using `write_int` or setting metadata and returning -1. Unsure if those are in the scope of this change Looks like this has conflicts with #3779, so I can update when how to handle that is decided. Part of https://github.com/rust-lang/miri/issues/3930.
2024-10-21Added support for prctl handling thread namesYoh Deadfall-7/+185
2024-10-21Replace `set_last_error` with `set_last_error_and_return_i*`Noah Bright-74/+42
Add `set_last_error_and_return_i64`, change calls from `this.libc_eval` to `LibcError`, and replace pairs of `set_last_error` and returning values of the right type with the new helper functions
2024-10-21Auto merge of #130950 - compiler-errors:yeet-eval, r=BoxyUwUbors-5/+4
Continue to get rid of `ty::Const::{try_}eval*` This PR mostly does: * Removes all of the `try_eval_*` and `eval_*` helpers from `ty::Const`, and replace their usages with `try_to_*`. * Remove `ty::Const::eval`. * Rename `ty::Const::normalize` to `ty::Const::normalize_internal`. This function is still used in the normalization code itself. * Fix some weirdness around the `TransmuteFrom` goal. I'm happy to split it out further; for example, I could probably land the first part which removes the helpers, or the changes to codegen which are more obvious than the changes to tools. r? BoxyUwU Part of https://github.com/rust-lang/rust/issues/130704
2024-10-20fmtThe Miri Cronjob Bot-2/+7
2024-10-20Merge from rustcThe Miri Cronjob Bot-16/+70
2024-10-20Preparing for merge from rustcThe Miri Cronjob Bot-1/+1
2024-10-19Fix testsMichael Goulet-5/+4
2024-10-19interpret errors: add map_err_kind, rename InterpError -> InterpErrorKindRalf Jung-16/+15
2024-10-18tail_calls: add test ensuring local vars are indeed goneRalf Jung-0/+46
2024-10-18pthread-threadname: ensure we can see the name set via the Rust APIRalf Jung-0/+17
2024-10-18Add more testsJules Bertholet-0/+55
2024-10-17miri: improve support for `f16` and `f128`Eduardo Sánchez Muñoz-9/+181
Rounding intrinsics are now implemented for `f16` and `f128` and tests for `is_infinite`, NaN, `abs`, `copysign`, `min`, `max`, rounding, `*_fast` and `*_algebraic` have been added.
2024-10-17data-race test: disable address reuse that can incur accidental syncRalf Jung-1/+1
2024-10-17Merge from rustcThe Miri Cronjob Bot-47/+4
2024-10-17Preparing for merge from rustcThe Miri Cronjob Bot-1/+1
2024-10-15update bootstrap configsJosh Stone-2/+2
2024-10-15Rollup merge of #131521 - jdonszelmann:rc, r=joboetMichael Goulet-2/+2
rename RcBox to RcInner for consistency Arc uses ArcInner too (created in collaboration with `@aDotInTheVoid` and `@WaffleLapkin` )
2024-10-15Rollup merge of #130568 - eduardosm:const-float-methods, r=RalfJung,tgross35Michael Goulet-43/+0
Make some float methods unstable `const fn` Some float methods are now `const fn` under the `const_float_methods` feature gate. I also made some unstable methods `const fn`, keeping their constness under their respective feature gate. In order to support `min`, `max`, `abs` and `copysign`, the implementation of some intrinsics had to be moved from Miri to rustc_const_eval (cc `@RalfJung).` Tracking issue: https://github.com/rust-lang/rust/issues/130843 ```rust impl <float> { // #[feature(const_float_methods)] pub const fn recip(self) -> Self; pub const fn to_degrees(self) -> Self; pub const fn to_radians(self) -> Self; pub const fn max(self, other: Self) -> Self; pub const fn min(self, other: Self) -> Self; pub const fn clamp(self, min: Self, max: Self) -> Self; pub const fn abs(self) -> Self; pub const fn signum(self) -> Self; pub const fn copysign(self, sign: Self) -> Self; // #[feature(float_minimum_maximum)] pub const fn maximum(self, other: Self) -> Self; pub const fn minimum(self, other: Self) -> Self; // Only f16/f128 (f32/f64 already const) pub const fn is_sign_positive(self) -> bool; pub const fn is_sign_negative(self) -> bool; pub const fn next_up(self) -> Self; pub const fn next_down(self) -> Self; } ``` r? libs-api try-job: dist-s390x-linux
2024-10-15Make some float methods unstable `const fn`Eduardo Sánchez Muñoz-39/+0
Some float methods are now `const fn` under the `const_float_methods` feature gate. In order to support `min`, `max`, `abs` and `copysign`, the implementation of some intrinsics had to be moved from Miri to rustc_const_eval.
2024-10-14use new check_min_arg_count helper in more placesRalf Jung-35/+17