Commit Graph

7003 Commits

Author SHA1 Message Date
Ralf Jung
6549764960 typo 2022-06-27 22:52:02 -04:00
Ralf Jung
108fe3473c update getrandom 2022-06-27 22:52:02 -04:00
Ralf Jung
c16b380d6b finally we can actually have adjacent allocations :) 2022-06-27 22:52:02 -04:00
bors
aefaa5b6f0 Auto merge of #2278 - RalfJung:rustup, r=RalfJung
Rustup
2022-06-28 01:53:06 +00:00
Ralf Jung
ea30b6badd rustup 2022-06-27 21:29:40 -04:00
Ralf Jung
098704e10f make use of get_alloc_info 2022-06-27 21:22:46 -04:00
bors
7fafbde038 Auto merge of #2275 - RalfJung:permissive-provenance-for-all, r=RalfJung
Enable permissive provenance by default

This completes the plan laid out in https://github.com/rust-lang/miri/issues/2133:
- We use permissive provenance with wildcard pointers by default.
- We print a warning on int2ptr casts. `-Zmiri-permissive-provenance` suppresses the warning; `-Zmiri-strict-provenance` turns it into a hard error.
- Raw pointer tagging is now always enabled, so we remove the `-Zmiri-tag-raw-pointers` flag and the code for untagged pointers. (Passing the flag still works, for compatibility -- but we just ignore it, with a warning.)

We also fix an intptrcast issue:
- Only live allocations are considered when computing the AllocId from an address.

So, finally, Miri has a good story for ptr2int2ptr roundtrips *and* no weird false negatives when doing raw pointer stuff with Stacked Borrows. :-) 🎉   Thanks a lot to everyone who helped with this, in particular `@carbotaniuman` who convinced me this is even possible.

Fixes https://github.com/rust-lang/miri/issues/2133
Fixes https://github.com/rust-lang/miri/issues/1866
Fixes https://github.com/rust-lang/miri/issues/1993
2022-06-28 01:20:40 +00:00
Ralf Jung
c1eddbc7fe show int2ptr warning once for each span (but don't duplicate the long help) 2022-06-27 20:50:45 -04:00
Ralf Jung
67e89b53e2 fix warning text 2022-06-27 20:04:46 -04:00
bors
f5593de579 Auto merge of #2221 - InfRandomness:freebsd-target-support, r=RalfJung
Freebsd-target-support

Implement freebsd as a target for miri
2022-06-27 17:40:15 +00:00
Ralf Jung
5719897fb0
improve old comment 2022-06-27 13:38:32 -04:00
bors
99afff9dc1 Auto merge of #2276 - RalfJung:join, r=RalfJung
make sure a thread is joined

Not sure how that can fail given that preemption is disabled but whatever...
2022-06-27 15:46:19 +00:00
Ralf Jung
fb186a2f2d make sure a thread is joined 2022-06-27 11:44:45 -04:00
Ralf Jung
d9e7a3ae82 typo
Co-authored-by: Oli Scherer <github35764891676564198441@oli-obk.de>
2022-06-27 09:08:56 -04:00
Ralf Jung
b479f092a8 avoid unnecessary indirection in miri-track-raw-pointers warning 2022-06-26 23:14:16 -04:00
Ralf Jung
3abec0e2af make macOS happy 2022-06-26 23:00:54 -04:00
Ralf Jung
1a5dfbeb7a fmt 2022-06-26 22:36:45 -04:00
Ralf Jung
4120425108 readme: move some things around 2022-06-26 22:19:56 -04:00
Ralf Jung
5c16713056 remove support for untagged pointers
good riddance!
2022-06-26 22:19:56 -04:00
Ralf Jung
294ef15adb more int2ptr cast tests, and fix casting of addresses inside dead allocations 2022-06-26 22:19:56 -04:00
Ralf Jung
13d425daeb make permissive provenance and raw-ptr tagging the default 2022-06-26 21:14:42 -04:00
infrandomness
aa072d72cc Cargo fmt 2022-06-27 01:39:25 +02:00
infrandomness
84a02787d8 Address code review
- Merge pthread_attr_getstack shim to unix/foreign_items.rs
2022-06-27 01:39:24 +02:00
Ralf Jung
aaa8ebb576 only test a few tests on FreeBSD 2022-06-27 01:39:24 +02:00
infrandomness
93c61f3905 Add pthread_attr_get_np shim 2022-06-27 01:39:24 +02:00
infrandomness
f2cbd3e2bc Add pthread_attr_getstack shim 2022-06-27 01:39:24 +02:00
infrandomness
e89b4d6df2 Fix panicking ui_tests framework 2022-06-27 01:39:24 +02:00
infrandomness
97a512070a Fix pending reviews 2022-06-27 01:39:24 +02:00
infrandomness
9130034337 Initial freebsd work 2022-06-27 01:39:24 +02:00
bors
4ce026fc1d Auto merge of #2274 - RalfJung:trophy, r=RalfJung
trophy case: add the data race in thread::scope
2022-06-26 23:00:18 +00:00
Ralf Jung
60570a39c7 trophy case: add the data race in thread::scope 2022-06-26 18:59:48 -04:00
bors
5ac47460d2 Auto merge of #2272 - RalfJung:progress, r=RalfJung
add -Zmiri-report-progress to regularly print a stacktrace of what we are executing

Fixes https://github.com/rust-lang/miri/issues/910

The stacktrace is printed every N basic blocks. I picked the default (1 million) to take a few seconds on my machine, but it can be adjusted by the user.
2022-06-26 18:39:38 +00:00
Ralf Jung
34be937d5f add -Zmiri-report-progress to regularly print a stacktrace of what we are executing 2022-06-26 14:31:57 -04:00
bors
ab88ba4299 Auto merge of #2270 - RalfJung:futex-ordering, r=RalfJung
test that futexes induce appropriate synchronization

This fails when I remove the `validate_lock_acquire` or `validate_lock_release` from `futex_wake`. So finally we got those code paths actually covered in tests. :)
2022-06-26 03:54:43 +00:00
Ralf Jung
e667ccb459 test that futexes induce appropriate synchronization 2022-06-25 23:40:58 -04:00
bors
4e67b63ad3 Auto merge of #2269 - RalfJung:fmt, r=RalfJung
make a bunch of tests look more like how they did before rustfmt
2022-06-26 03:31:57 +00:00
Ralf Jung
5aeba7f86b make a bunch of tests look more like how they did before rustfmt 2022-06-25 23:31:24 -04:00
bors
9e2dac4787 Auto merge of #2245 - saethlin:color-always, r=RalfJung
Actually pass through the request for --color=always

https://github.com/rust-lang/miri/pull/2243 actually doesn't work 😂

The suggestion to split on `,` was good but `arg` is actually the whole `--json=diagnostic-rendered-ansi,artifacts,future-incompat
`, and of course I didn't test that change locally and we have no test for this in CI.

Therefore, I would like some guidance on making a test for this because I'm going to rely on this working.
2022-06-26 00:11:30 +00:00
Ralf Jung
fed0e16397 don't assert the same thing twice 2022-06-25 20:02:03 -04:00
bors
320084e7a8 Auto merge of #2268 - RalfJung:not-unpin-protected, r=RalfJung
test that &mut !Unpin references are protected
2022-06-25 23:52:34 +00:00
Ralf Jung
d3ca71ba37 test that &mut !Unpin references are protected 2022-06-25 19:15:11 -04:00
bors
54a495cb27 Auto merge of #2267 - RalfJung:rustup, r=RalfJung
rustup

I cannot reproduce https://github.com/rust-lang/rust/issues/98493 so let's see what CI says.
2022-06-25 20:01:49 +00:00
Ralf Jung
7c025a8f0e test for forgetting locked mutex 2022-06-25 16:01:00 -04:00
Ralf Jung
e5022bf48a join all the threads 2022-06-25 15:46:47 -04:00
Ralf Jung
9124420b2f rustup 2022-06-25 15:06:53 -04:00
bors
e3d42e6963 Auto merge of #2265 - RalfJung:readme, r=RalfJung
README: multi-seed loop: also test the 0 seed
2022-06-25 16:29:38 +00:00
Ralf Jung
54fbd313a6 README: multi-seed loop: also test the 0 seed 2022-06-25 12:27:50 -04:00
bors
1589ba3bbc Auto merge of #2264 - RalfJung:not-a-fixme, r=RalfJung
remove a FIXME that is not actually a bug
2022-06-25 15:54:31 +00:00
Ralf Jung
f66c64bed2 remove a FIXME that is not actually a bug 2022-06-25 11:52:29 -04:00
Ben Kimock
da6a78012a Actually pass through the request for --color=always 2022-06-24 23:08:18 -04:00