about summary refs log tree commit diff
path: root/src/tools/miri
AgeCommit message (Collapse)AuthorLines
2024-09-25enable pthread_cond_timedwait test on AndroidRalf Jung-1/+1
2024-09-25Android: Fixed tests for libc time APIYoh Deadfall-8/+28
2024-09-25disable AVR test since it doesn't workRalf Jung-1/+2
2024-09-25update BASIC test list: no longer test HashMap, add libc-mem instead of ↵Ralf Jung-6/+6
'align' for heap allocator coverage, move 'hello' to UNIX HashMap now needs pretty target-specific randomness functions. It still works on Android, but not on FreeBSD and Solarish.
2024-09-25avoid using HashMap in fs testRalf Jung-3/+3
2024-09-25add test for std::randomRalf Jung-0/+5
2024-09-25fmtThe Miri Cronjob Bot-16/+19
2024-09-25Merge from rustcThe Miri Cronjob Bot-53/+105
2024-09-25Preparing for merge from rustcThe Miri Cronjob Bot-1/+1
2024-09-24be even more precise about "cast" vs "coercion"Lukas Markeffsky-1/+1
2024-09-24Scope CI permissions to the job that needs itJakub Beránek-6/+5
2024-09-24looks like we need more permissionsRalf Jung-1/+3
2024-09-23Rollup merge of #130727 - compiler-errors:objects, r=RalfJungMichael Goulet-8/+41
Check vtable projections for validity in miri Currently, miri does not catch when we transmute `dyn Trait<Assoc = A>` to `dyn Trait<Assoc = B>`. This PR implements such a check, and fixes https://github.com/rust-lang/miri/issues/3905. To do this, we modify `GlobalAlloc::VTable` to contain the *whole* list of `PolyExistentialPredicate`, and then modify `check_vtable_for_type` to validate the `PolyExistentialProjection`s of the vtable, along with the principal trait that was already being validated. cc ``@RalfJung`` r? ``@lcnr`` or types I also tweaked the diagnostics a bit. --- **Open question:** We don't validate the auto traits. You can transmute `dyn Foo` into `dyn Foo + Send`. Should we check that? We currently have a test that *exercises* this as not being UB: https://github.com/rust-lang/rust/blob/6c6d210089e4589afee37271862b9f88ba1d7755/src/tools/miri/tests/pass/dyn-upcast.rs#L14-L20 I'm not actually sure if we ever decided that's actually UB or not 🤔 We could perhaps still check that the underlying type of the object (i.e. the concrete type that was unsized) implements the auto traits, to catch UB like: ```rust fn main() { let x: &dyn Trait = &std::ptr::null_mut::<()>(); let _: &(dyn Trait + Send) = std::mem::transmute(x); //~^ this vtable is not allocated for a type that is `Send`! } ```
2024-09-23Check vtable projections for validity in miriMichael Goulet-8/+41
2024-09-23Auto merge of #125645 - RalfJung:unclear_local_imports, r=nnethercotebors-45/+47
add unqualified_local_imports lint This lint helps deal with https://github.com/rust-lang/rustfmt/issues/4709 by having the compiler detect imports of local items that are not syntactically distinguishable from imports from other cates. Making them syntactically distinguishable ensures rustfmt can consistently apply the desired import grouping.
2024-09-23fix workflow permissionsRalf Jung-1/+2
2024-09-23fix unqualified_local_imports in MiriRalf Jung-45/+47
2024-09-23add test for new abort_unwind functionRalf Jung-0/+44
2024-09-23update miri testjoboet-1/+1
2024-09-23miri: shim `CCRandomGenerateBytes`joboet-0/+17
2024-09-22Auto merge of #3852 - tiif:rwrefactor, r=RalfJungbors-153/+249
Refactor fd read/write This PR passed the responsibility of reading to user supplied buffer and dest place to each implementation of ``FileDescription::read/write/pread/pwrite``. This is part of #3665.
2024-09-22simplify eventfd handling a bitRalf Jung-49/+30
2024-09-22remove some unnecessary to_ownedRalf Jung-9/+9
2024-09-22read, write: move cast-to-usize logic up and deduplicate itRalf Jung-4/+6
2024-09-22further tweak FileDescription commentsRalf Jung-17/+12
2024-09-22Pass pointer and len to FileDescription::write and change the type of len in ↵tiif-47/+60
read to usize
2024-09-22Use &[u8] instead of Vec<u8> and improve docstiif-13/+25
2024-09-22try to give the CI job permission to create PRsRalf Jung-0/+3
2024-09-22rustfmt: switch over to setting style_editionRalf Jung-1/+1
2024-09-22Merge from rustcRalf Jung-2/+2
2024-09-22Preparing for merge from rustcRalf Jung-1/+1
2024-09-21Auto merge of #127546 - workingjubilee:5-level-paging-exists, r=saethlinbors-2/+2
Correct outdated object size limit The comment here about 48 bit addresses being enough was written in 2016 but was made incorrect in 2019 by 5-level paging, and then persisted for another 5 years before being noticed and corrected. The bolding of the "exclusive" part is merely to call attention to something I missed when reading it and doublechecking the math. try-job: i686-msvc try-job: test-various
2024-09-21fmt (with a huge diff for some reason)Ralf Jung-205/+180
2024-09-21Merge from rustcRalf Jung-4/+40
2024-09-21Preparing for merge from rustcRalf Jung-1/+1
2024-09-20Auto merge of #124895 - obeis:static-mut-hidden-ref, r=compiler-errorsbors-0/+35
Disallow hidden references to mutable static Closes #123060 Tracking: - https://github.com/rust-lang/rust/issues/123758
2024-09-20miri: An error message got changedJubilee Young-2/+2
2024-09-19Make the intention of the miri test more clearAdwin White-4/+5
2024-09-19Adapt test to new layoutAdwin White-2/+2
2024-09-17Use `@only-target` in SSE and SSE2 tests tooEduardo Sánchez Muñoz-1784/+1760
It looks cleaner and makes it consistent with other X86 tests
2024-09-17ptr_offset_unsigned_overflow: extend testRalf Jung-5/+6
2024-09-17Auto merge of #3891 - tiif:tokiotest, r=RalfJungbors-5/+46
Fix tokio test ICE Fixes #3858 It turned out that the issue mentioned [here](https://github.com/rust-lang/miri/issues/3858#issuecomment-2336726299) is the exact cause of ICE. So in this PR, I changed the type of ``EpollEventInterest::epfd`` from ``i32`` to ``WeakFileDescriptionRef``.
2024-09-17Tokio ICE fix: Changed the type of EpollEventInterest::epfd from i32 to ↵tiif-5/+46
WeakFileDescriptionRef
2024-09-17Auto merge of #3894 - rust-lang:rustup-2024-09-17, r=RalfJungbors-15/+10
Automatic Rustup
2024-09-17Auto merge of #3893 - rust-lang:autolabel, r=RalfJungbors-0/+12
Automatically add/remove labels when github review (requests) are used
2024-09-17fmtThe Miri Cronjob Bot-6/+2
2024-09-17Merge from rustcThe Miri Cronjob Bot-9/+8
2024-09-17Preparing for merge from rustcThe Miri Cronjob Bot-1/+1
2024-09-16Automatically add/remove labesl when github review (requests) are usedOli Scherer-0/+12
2024-09-16Fix run --depOli Scherer-3/+8