Commit Graph

5919 Commits

Author SHA1 Message Date
Oli Scherer
1d0fe1b6bb Implement the output dropping for windows, too 2022-04-25 14:22:55 +00:00
Oli Scherer
4d4855c762 Add a command line flag to avoid printing to stdout and stderr 2022-04-25 13:12:55 +00:00
bors
3ac7ca4c19 Auto merge of #2075 - y86-dev:master, r=RalfJung
Allow to track multiple alloc-ids, call-ids and pointer tags

Closes #2073.
2022-04-21 14:34:02 +00:00
Ralf Jung
b472ef5bd8
be explicit about types 2022-04-21 16:19:28 +02:00
bors
2e419e4ff6 Auto merge of #2080 - RalfJung:2phase, r=RalfJung
make sure 2-phase borows work even with raw ptr tagging
2022-04-21 14:10:20 +00:00
Ralf Jung
3ca59d2fbf make sure 2-phase borows work even with raw ptr tagging 2022-04-21 16:09:35 +02:00
y86-dev
bf17dbebc9 Added support for multiple tracked pointers, allocs and calls
- Changed arg parsing to handle comma seperated list of `u64`'s.
- Changed type and field names of config, executor and global state
  to hold a set of tracked ids.
- Adjusted Readme:
    - explained list format
    - arguments do not overwrite, instead append
    - no effect on duplication
- Created a parsing function for comma separated lists
- Added error printing to alloc_id parsing
2022-04-21 10:40:11 +02:00
bors
edd4858846 Auto merge of #2078 - RalfJung:rustup, r=RalfJung
rustup

https://github.com/rust-lang/rust/pull/93313 somehow made it so that this does not have to be mutable any more...
2022-04-20 21:46:55 +00:00
Ralf Jung
432015d1f6 rustup 2022-04-20 17:46:31 -04:00
bors
ba24c311ee Auto merge of #2077 - RalfJung:more-test, r=RalfJung
add some more tests
2022-04-20 14:52:53 +00:00
Ralf Jung
e214e6db98 add mut_below_shr test 2022-04-20 10:52:25 -04:00
Ralf Jung
d4a85f6305 add another test for #2068 2022-04-20 10:39:17 -04:00
bors
c9039de613 Auto merge of #2071 - RalfJung:provenance, r=RalfJung
adjust for provenance cleanup

This is the Miri side of https://github.com/rust-lang/rust/pull/96165
2022-04-20 12:44:39 +00:00
Ralf Jung
b5a76c7ff0 add test for https://github.com/rust-lang/miri/issues/2068 2022-04-20 08:44:10 -04:00
Ralf Jung
dd968a89bf rustup 2022-04-20 08:44:06 -04:00
Ralf Jung
f1023fbdc9 avoid into_pointer_or_addr and into_parts in visit_freeze_sensitive 2022-04-20 08:40:19 -04:00
Ralf Jung
ec1dc749a3 adjust for provenance cleanup 2022-04-20 08:40:19 -04:00
bors
598ae7418b Auto merge of #2074 - RalfJung:tls-ro, r=RalfJung
do not consider thread-local allocations read-only

They are not in read-only memory the way regular `static`s are.

Fixes https://github.com/rust-lang/rust/issues/96191
2022-04-19 18:56:58 +00:00
Ralf Jung
763ff1c49f do not consider thread-local allocations read-only 2022-04-19 14:56:07 -04:00
bors
9d47a5633a Auto merge of #2070 - RalfJung:size-assert, r=RalfJung
add size assertions for some core types
2022-04-18 01:58:52 +00:00
Ralf Jung
5a3ec3780e add size assertions for some core types 2022-04-17 21:58:36 -04:00
bors
35aeba78db Auto merge of #2067 - RalfJung:strerror_r, r=RalfJung
implement strerror_r

This isn't perfect; we end up using [this match](72a25d05bf/library/std/src/io/error.rs (L380)) rather than the platform-specific messages, but at least we show something -- this is mostly informational anyway.

Cc https://github.com/rust-lang/miri/issues/2057
2022-04-17 02:54:53 +00:00
Ralf Jung
db2c4b6dfa implement strerror_r 2022-04-16 22:54:38 -04:00
bors
d1f31f913c Auto merge of #2065 - RalfJung:readme, r=RalfJung
readme

We support SIMD these days. :D At least via portable-simd.
2022-04-16 13:17:56 +00:00
Ralf Jung
efe871f208 readme 2022-04-16 09:17:01 -04:00
bors
1ef91e1227 Auto merge of #2064 - RalfJung:rustup, r=RalfJung
rustup
2022-04-16 12:42:58 +00:00
Ralf Jung
0669b22759 rustup 2022-04-16 08:41:34 -04:00
bors
05bbfe84a9 Auto merge of #2063 - RalfJung:macos-timeout, r=RalfJung
increase slack for timeout test

This still sometimes fails on macOS, so let's increase the slack.
2022-04-10 15:24:33 +00:00
Ralf Jung
3f1d3aedcd increase slack for timeout test 2022-04-10 11:23:56 -04:00
bors
8a9ef3c248 Auto merge of #2062 - RalfJung:rustup, r=RalfJung
rustup

https://github.com/rust-lang/rust/pull/95621 made channels strict provenance compliant. :)
2022-04-10 13:37:33 +00:00
Ralf Jung
ebb70da4c6 rustup 2022-04-10 09:36:30 -04:00
bors
a4a667b3ce Auto merge of #2061 - RalfJung:edition, r=RalfJung
port Miri to edition 2021

`cargo fix --edition` didn't change anything for either of these crates, so this looks like a very simple port. And then we can remove a bunch of annoying imports. :)

I thought this also unlocks the named format string stuff, but it seems that works on all editions except for that problem around `panic!`. Whatever. ;)
2022-04-09 16:45:09 +00:00
Ralf Jung
507c09f45f use new format string syntax in some places 2022-04-09 11:32:49 -04:00
Ralf Jung
855af088b8 remove no longer needed imports 2022-04-09 11:32:49 -04:00
Ralf Jung
a57c30118a port cargo-miri to edition 2021 2022-04-09 11:17:16 -04:00
Ralf Jung
af3f683ba6 port Miri to edition 2021 2022-04-09 11:16:50 -04:00
bors
c568f32f16 Auto merge of #2060 - RalfJung:rustup, r=RalfJung
rustup

Cc https://github.com/rust-lang/rust/issues/95844
2022-04-09 13:42:12 +00:00
Ralf Jung
d2cb11cc15 rustup 2022-04-09 09:41:29 -04:00
bors
be72564a64 Auto merge of #2055 - RalfJung:rustup, r=RalfJung
Rustup

Fixes https://github.com/rust-lang/miri/issues/1717
2022-04-08 13:57:45 +00:00
Ralf Jung
3a59a15af7 rustup 2022-04-08 09:57:25 -04:00
Ralf Jung
363f8ab745 thread name setting works with strict provenance now :) 2022-04-08 09:57:25 -04:00
Ralf Jung
c8553d8162 fix Windows stdout/stderr 2022-04-08 09:57:25 -04:00
bors
f3a98563df Auto merge of #2058 - RalfJung:variadic, r=RalfJung
For variadic functions, accept arbitrary trailing arguments

However, make sure that if we use argument N we check the size of all arguments before that, because otherwise this might not work properly depending on how varargs are implemented. This caught bugs in our futex tests. ;)

I couldn't find a good way to systematically ensure this, so it is just something we have to be on the look for during review. (This generally applies also for fixed-arg shims: we should check the size of each parameter.)

Also treat prctl like a variadic function, Cc `@saethlin.`
2022-04-08 13:08:08 +00:00
Ralf Jung
cac48dd734 treat prctl like a variadic function 2022-04-07 16:20:19 -04:00
Ralf Jung
59ee672fef for variadic functions, accept arbitrary trailing arguments but make sure we check all leading arguments 2022-04-07 16:19:00 -04:00
Ralf Jung
e1556c8576 add machine hook tcx parameters 2022-04-07 15:05:47 -04:00
bors
8acc9b2799 Auto merge of #2056 - RalfJung:rustup2, r=RalfJung
rustup

Let's go in smaller steps, this might work better than https://github.com/rust-lang/miri/pull/2055
2022-04-07 12:59:13 +00:00
Ralf Jung
f2cfc928a5 rustup 2022-04-07 08:58:48 -04:00
bors
0e2def5c12 Auto merge of #2054 - m-ou-se:futex-wait-bitset, r=RalfJung
Add support for FUTEX_{WAIT,WAKE}_BITSET

FUTEX_WAIT_BITSET and FUTEX_WAKE_BITSET are extensions of FUTEX_WAIT and FUTEX_WAKE that allow tagging each waiting thread with up to 32 'labels', and then only wake up threads that match certain labels. The non-bitset operations behave like their bitset was fully set (u32::MAX), meaning that they'll wait for anything, and wake up anything.

The only other difference is that FUTEX_WAIT_BITSET uses an absolute timeout instead of an relative timeout like FUTEX_WAIT.

Often, FUTEX_WAIT_BITSET is used not for its bitset functionality, but only for its absolute timeout functionality. It is then used with a bitset of u32::MAX.

~~This adds support for only that use case to Miri, as that's all `std` currently needs. Any other bitset is still unsupported.~~

Update: This adds full support for both these syscalls.
2022-04-06 22:20:11 +00:00
Mara Bos
4fdda315cc Put 306ba8357f in rust-version. 2022-04-07 00:02:20 +02:00