Ralf Jung
d09db1660b
fix and slightly improve data race reports
2022-07-01 20:13:44 -04:00
Ralf Jung
dfdedae840
avoid copying thread manager state in data race detector
2022-07-01 17:07:29 -04:00
Ralf Jung
f238513efa
rename some data_race types for more clarity
2022-07-01 16:21:48 -04:00
bors
c1a37b87aa
Auto merge of #2298 - InfRandomness:shim-error, r=RalfJung
...
Add `__error` to freebsd shims
Signed-off-by: InfRandomness <infrandomness@gmail.com>
2022-07-01 17:41:10 +00:00
InfRandomness
dca2bb68b3
Add __error
to freebsd shims
...
Signed-off-by: InfRandomness <infrandomness@gmail.com>
2022-07-01 18:42:33 +02:00
Ralf Jung
12d04ac4c4
make clippy happy
2022-07-01 12:25:35 -04:00
Ralf Jung
af39709a9c
rustup
2022-07-01 10:14:31 -04:00
Ralf Jung
7f3fbbdee7
allocation tracking: also print size, alignment, kind of the allocation
2022-06-30 22:24:23 -04:00
Ralf Jung
aef78d3a9f
make -Zmiri-env-forward take precedence over -Zmiri-env-exclude
2022-06-30 11:14:30 -04:00
Ralf Jung
6a204e2dec
use Rust SnakeCase
2022-06-29 22:17:46 -04:00
bors
5974e7d4a9
Auto merge of #2287 - RalfJung:field-retagging, r=RalfJung
...
stacked borrows: add option for recursive field retagging
2022-06-29 23:04:07 +00:00
Ralf Jung
c4e86e103e
add option for recursive field retagging
2022-06-29 18:22:30 -04:00
Christian Legnitto
73a1a27a45
Support gettimeofday
on more than macos
...
This appears to be in linux and in openbsd as well:
* https://github.com/torvalds/linux/blob/master/lib/vdso/gettimeofday.c
* https://github.com/openbsd/src/blob/master/sys/sys/time.h#L439
Co-authored-by: Ralf Jung <post@ralfj.de>
2022-06-29 17:48:04 -04:00
Ralf Jung
839c120b40
fmt
2022-06-29 10:09:18 -04:00
Ralf Jung
f389d46b04
also prune caller_location frames when backtrace=off
2022-06-29 09:33:12 -04:00
Ralf Jung
28dea673be
rustup
2022-06-29 08:33:06 -04:00
Ralf Jung
8bd4bbe3e4
tweak int2ptr diagnostics
2022-06-28 08:52:22 -04:00
bors
aaaed51ab8
Auto merge of #2279 - RalfJung:adjacent-allocs, r=RalfJung
...
Allow non-ZST allocations to be adjacent
Also `cargo update` in test-cargo-miri... no need to make a separate PR for that right?...
2022-06-28 02:52:23 +00:00
Ralf Jung
c16b380d6b
finally we can actually have adjacent allocations :)
2022-06-27 22:52:02 -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
Ralf Jung
5719897fb0
improve old comment
2022-06-27 13:38:32 -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
1a5dfbeb7a
fmt
2022-06-26 22:36:45 -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
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
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
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
Ralf Jung
58c79c5b6f
tweaks and feedback
2022-06-24 22:02:17 -04:00
Ralf Jung
4fbb284a99
implement 'delimited' expose tracking so we still detect some UB
2022-06-24 20:05:56 -04:00
Ralf Jung
8d6fdaa024
make the tests pass
...
(and some formatting)
2022-06-24 18:03:02 -04:00
Ralf Jung
c0f7118342
reorganize exposure code a bit
2022-06-24 16:45:22 -04:00
carbotaniuman
d1e7de117c
Try fix stuff
2022-06-24 16:10:23 -04:00
carbotaniuman
c7feb014b0
Maybe this wil work
2022-06-24 16:10:23 -04:00
carbotaniuman
57ce47b728
Handle wildcard pointers in SB
2022-06-24 16:10:23 -04:00
bors
655eed35b7
Auto merge of #2248 - RalfJung:arc-drop-fix, r=RalfJung
...
do not protect SRW items
This is the Miri version of https://github.com/rust-lang/rust/pull/98017 .
2022-06-22 21:39:41 +00:00
Ralf Jung
f992099820
fix ICE when const refers to extern static
2022-06-21 21:03:40 -07:00
Ralf Jung
8d1b2ca3ec
check that tag_alloc_base_pointer is not called on the wrong things
2022-06-21 21:03:40 -07:00