about summary refs log tree commit diff
path: root/src/tools/miri/tests
AgeCommit message (Collapse)AuthorLines
2023-04-14Merge from rustcRalf Jung-3/+0
2023-04-13Auto merge of #2833 - oli-obk:ui_test_bump, r=RalfJungbors-13/+9
Update to new ui_test crate
2023-04-13Auto merge of #2841 - RalfJung:compiletest, r=oli-obkbors-0/+12
compiletest: complain about unknown flags This would have avoided https://github.com/rust-lang/rust/issues/110102
2023-04-13Update to new ui_test crateOli Scherer-13/+9
2023-04-13compiletest: complain about unknown flagsRalf Jung-0/+12
2023-04-13Rollup merge of #110072 - joshtriplett:stabilize-is-terminal, r=Mark-SimulacrumMatthias Krüger-3/+0
Stabilize IsTerminal FCP completed in https://github.com/rust-lang/rust/issues/98070 . closes: https://github.com/rust-lang/rust/issues/98070
2023-04-12add memcpy/strcpy shimsmojave2-0/+80
add memcpy/strcpy/strncpy shims fix bug add memcpy/strcpy/strncpy shims add a test for strncpy remove strncpy shim
2023-04-11filter out notesDebugSteven-53/+1
2023-04-11throw unsupported for epoll_waitDebugSteven-0/+69
2023-04-11Update tests/pass-dep/shims/libc-misc.rsChristian Legnitto-1/+1
Co-authored-by: Ben Kimock <kimockb@gmail.com>
2023-04-11Add shim for SIGRTMINChristian Legnitto-0/+19
Fixes https://github.com/rust-lang/miri/issues/2832.
2023-04-10rustupBen Kimock-1/+3
2023-04-10Turn off the alignment check pass, remove the panic test for itBen Kimock-11/+0
The panic test is now counted as an error test; we encounter a Terminate terminator, and emit an interpreter error, as opposed to just terminating due to a panic. So this test should have broken with https://github.com/rust-lang/rust/pull/102906 but wasn't because the Miri test suite is currently broken in rust-lang/rust: https://github.com/rust-lang/rust/issues/110102
2023-04-10Merge from rustcBen Kimock-13/+67
2023-04-10Stabilize IsTerminalJosh Triplett-3/+0
closes: https://github.com/rust-lang/rust/issues/98070
2023-04-06Add miri tests for terminate terminatorGary Guo-4/+58
2023-04-06Bless testsGary Guo-9/+9
2023-04-04Merge from rustcOli Scherer-11/+52
2023-03-31Auto merge of #98112 - saethlin:mir-alignment-checks, r=oli-obkbors-11/+25
Insert alignment checks for pointer dereferences when debug assertions are enabled Closes https://github.com/rust-lang/rust/issues/54915 - [x] Jake tells me this sounds like a place to use `MirPatch`, but I can't figure out how to insert a new basic block with a new terminator in the middle of an existing basic block, using `MirPatch`. (if nobody else backs up this point I'm checking this as "not actually a good idea" because the code looks pretty clean to me after rearranging it a bit) - [x] Using `CastKind::PointerExposeAddress` is definitely wrong, we don't want to expose. Calling a function to get the pointer address seems quite excessive. ~I'll see if I can add a new `CastKind`.~ `CastKind::Transmute` to the rescue! - [x] Implement a more helpful panic message like slice bounds checking. r? `@oli-obk`
2023-03-24miri: fix raw pointer dyn receiversRalf Jung-0/+27
2023-03-24Merge from rustcRalf Jung-5/+7
2023-03-23A MIR transform that checks pointers are alignedBen Kimock-11/+25
2023-03-22Add `CastKind::Transmute` to MIRScott McMurray-5/+7
Updates `interpret`, `codegen_ssa`, and `codegen_cranelift` to consume the new cast instead of the intrinsic. Includes `CastTransmute` for custom MIR building, to be able to test the extra UB.
2023-03-20move reject with isolation for fcntl under F_FULLFSYNCDebugSteven-10/+19
2023-03-19Update the virtual clock in isolation mode to step forward with around the ↵Oli Scherer-5/+23
same speed as the host system.
2023-03-16TB: select tests to run both TB and SBNeven Villani-5/+116
2023-03-16TB: new testsNeven Villani-0/+888
2023-03-16TB: document TB changes in READMENeven Villani-0/+205
2023-03-14Merge from rustcBen Kimock-74/+23
2023-03-12Remove uses of `box_syntax` in rustc and toolsclubby789-38/+15
2023-03-11Implement intrinsics for round_ties_evenBen Kimock-0/+30
2023-03-09replace legacy copyright annotations in submodulesPietro Albini-36/+8
2023-02-24Use pointers to `c_char` instead of `i8` in `miri_host_to_target_path`LevitatingLion-6/+18
This makes sure that the interface of `miri_host_to_target_path` is compatible with `CStr` for targets where `c_char` is unsigned (such as ARM). This commit changes the signature of `miri_host_to_target_path` in the README and in all test cases.
2023-02-21Avoid formatting dyn* test as rustftm doesn't understand it yet and just ↵Oli Scherer-0/+3
deletes code
2023-02-21Merge from rustcRalf Jung-5/+122
2023-02-20fix Stacked Borrows interaction with dyn*Ralf Jung-2/+0
2023-02-20basic dyn* support for MiriRalf Jung-5/+124
2023-02-17Add tests for moving data across await pointBryan Garza-0/+81
This patch adds a few tests to assert the current behavior when passing data across an await point. This will help to test out an upcoming fix for the issue of arguments in async functions growing in size because of the generator upvar that is generated when we desugar the async function. See https://github.com/rust-lang/rust/issues/62958 Also relates to https://github.com/rust-lang/rust/pull/107500 Co-authored-by: Ralf Jung <post@ralfj.de>
2023-02-09Merge from rustcRalf Jung-1/+0
2023-02-08Rollup merge of #107429 - tgross35:from-bytes-until-null-stabilization, ↵Michael Goulet-1/+0
r=dtolnay Stabilize feature `cstr_from_bytes_until_nul` This PR seeks to stabilize `cstr_from_bytes_until_nul`. Partially addresses #95027 This function has only been on nightly for about 10 months, but I think it is simple enough that there isn't harm discussing stabilization. It has also had at least a handful of mentions on both the user forum and the discord, so it seems like it's already in use or at least known. This needs FCP still. Comment on potential discussion points: - eventual conversion of `CStr` to be a single thin pointer: this function will still be useful to provide a safe way to create a `CStr` after this change. - should this return a length too, to address concerns about the `CStr` change? I don't see it as being particularly useful, and it seems less ergonomic (i.e. returning `Result<(&CStr, usize), FromBytesUntilNulError>`). I think users that also need this length without the additional `strlen` call are likely better off using a combination of other methods, but this is up for discussion - `CString::from_vec_until_nul`: this is also useful, but it doesn't even have a nightly implementation merged yet. I propose feature gating that separately, as opposed to blocking this `CStr` implementation on that Possible alternatives: A user can use `from_bytes_with_nul` on a slice up to `my_slice[..my_slice.iter().find(|c| c == 0).unwrap()]`. However; that is significantly less ergonomic, and is a bit more work for the compiler to optimize compared the direct `memchr` call that this wraps. ## New stable API ```rs // both in core::ffi pub struct FromBytesUntilNulError(()); impl CStr { pub const fn from_bytes_until_nul( bytes: &[u8] ) -> Result<&CStr, FromBytesUntilNulError> } ``` cc ```@ericseppanen``` original author, ```@Mark-Simulacrum``` original reviewer, ```@m-ou-se``` brought up some issues on the thin pointer CStr ```@rustbot``` modify labels: +T-libs-api +needs-fcp
2023-02-07Merge from rustcRalf Jung-64/+64
2023-02-06also do not add noalias on not-Unpin BoxRalf Jung-10/+44
2023-02-06make &mut !Unpin not dereferenceableRalf Jung-54/+20
See https://github.com/rust-lang/unsafe-code-guidelines/issues/381 for discussion.
2023-02-03Auto merge of #2764 - DebugSteven:sleep, r=oli-obkbors-1/+15
Implement epoll_wait This PR continues working on https://github.com/rust-lang/miri/issues/602. This is an implementation for `sleep`, though admittedly not a good one. It just does busy waiting.
2023-02-01fmtRalf Jung-1/+1
2023-02-01Stabilize feature 'cstr_from_bytes_until_nul'Trevor Gross-1/+0
2023-01-31busy waiting implementation for sleepDebugSteven-1/+15
2023-01-31make unaligned_reference a hard errorRalf Jung-5/+12
2023-01-29remove scfix testRalf Jung-35/+0
It was broken, and the fixed version actually fails...
2023-01-25add scfix testRalf Jung-0/+35