Ralf Jung
cbb695f782
fix some typos
2020-11-29 19:43:44 +01:00
JCTyBlaidd
6c5722933e
Fix typos - looked into the papers handling of timestamps, after looking into it again, it seems the paper only increments the timestamp after release operations, so changed to approximation of that implementation.
2020-11-28 17:17:07 +00:00
JCTyBlaidd
55fc552d99
Apply review changes, incrementing the clocks twice is an unnecessary hold-over from earlier versions so fixed.
2020-11-27 19:26:06 +00:00
JCTyBlaidd
3268f56a97
Fix review changes
2020-11-22 17:28:12 +00:00
Ralf Jung
697f6e36bd
rustup
2020-11-20 14:07:52 +01:00
Ralf Jung
517728bf97
avoid fallback logic (and we do not need the flag value currently anyway)
2020-11-19 09:36:33 +01:00
Mara Bos
cdb7adb4b3
Make weak syscalls in std work.
...
std now looks up `getrandom` and `statx` with `dlsym` before attempting
to use `syscall(SYS_.., ..)`.
It also now passes all arguments as a machine-sized word, instead of
their original types.
2020-11-19 09:34:46 +01:00
JCTyBlaidd
0b0264fc82
Run rustfmt on vector_clock.rs and data_race.rs
2020-11-15 20:19:34 +00:00
JCTyBlaidd
a3b7839bbd
Add comment regarding seq-cst ordering & add test for disabling the data-race detector.
2020-11-15 20:12:58 +00:00
JCTyBlaidd
69fb6413dd
Tidy up comments and function layout, should fix most of the review notes.
2020-11-15 18:30:26 +00:00
Ralf Jung
43673d9a87
rustup
2020-11-11 10:29:10 +01:00
JCTyBlaidd
2a40d9b7a0
More aggressive vector index re-use, and added some tests.
2020-11-06 17:29:54 +00:00
Ralf Jung
f31f00d5af
rustup
2020-11-05 17:09:44 +01:00
JCTyBlaidd
c70bbea257
Move to use of thread termination hook for vector re-use,
...
convert validate atomic op to use shared reference and get_raw
instead of get_raw_mut so it can be used for validate_atomic_load as well
2020-11-05 14:18:28 +00:00
JCTyBlaidd
9cb6b8da3f
Split out vector_clock to separate file, general tidy up of some of the
...
code & add support for vector index re-use for multiple threads
after termination.
2020-11-05 03:54:39 +00:00
JCTyBlaidd
95c99b2044
Detect races between atomic and non-atomic accesses of a variable,
...
previously only data races between two non-atomic accesses were
detected.
2020-11-04 21:35:48 +00:00
JCTyBlaidd
fe2e857cc3
Add newlines at end of file + use replace.
...
add dangling thread variant of one of the benchmarks
2020-11-02 13:08:09 +00:00
JCTyBlaidd
cae4302003
Fix & rebase
2020-11-02 03:06:30 +00:00
JCTyBlaidd
ed32b260f9
Add tests, and fix bug in atomic RMW relaxed stores
2020-11-02 02:57:06 +00:00
JCTyBlaidd
89814f1b3f
Initial data-race detector,
...
passes all current tests but additional tests are required
2020-11-02 02:57:05 +00:00
Ralf Jung
194451345d
add an option to track raw pointer tags in Stacked Borrows
2020-10-28 12:23:35 +01:00
Ralf Jung
39f7b35327
Stacked Borrows: print affected memory location on errors
2020-10-28 12:04:39 +01:00
Ralf Jung
086e9c49a9
pointer tag tracking: also show when tag is being created
2020-10-27 14:22:29 +01:00
Camelid
05e9ae042c
Make miri_default_args()
a constant
2020-10-24 12:46:38 -07:00
est31
1ae157bc9e
Replace target.target with target
...
Rustc removed the target wrapper and exposed the target directly.
Result of running:
find . -type f -exec sed -i -e 's/target\.target\([)\.,;]\)/target\1/g' {} \;
Plus one manual edit of the rust-version file
2020-10-15 21:18:23 +02:00
bors
73d5c42076
Auto merge of #1580 - Aaron1011:feature/backtrace-fn-ptr, r=RalfJung
...
Add an `fn_ptr` field to `MiriFrame`
The `backtrace-rs` crate can use this to implement
`Frame::symbol_address`, which is used to skip frames
above the call to `Backtrace::capture` on the stack.
The function pointer will not be useable for comparison purposes if the
function is generic, as CTFE creates a new function pointer for each
cast of a (monomorphized) generic function. However, this already
affects code running under Miri, and isn't a problem for `backtrace-rs`
(which only casts a non-generic function).
I've added logic to allow `MiriFrame` to have either 4 or 5 fields - if
a 5th field is present, we write the function pointer to it.
2020-10-11 22:34:57 +00:00
Aaron Hill
c889eba4b2
Add comment about deprecation
2020-10-11 17:57:49 -04:00
Aaron Hill
0893ea1973
Rustup
...
This gets Miri building again after the `run_compiler` changes
2020-10-11 17:31:52 -04:00
Aaron Hill
6a6767fa2a
Apply suggestions from code review
...
Co-authored-by: Ralf Jung <post@ralfj.de>
2020-10-11 13:40:00 -04:00
Aaron Hill
be51e6bd07
Add an fn_ptr
field to MiriFrame
...
The `backtrace-rs` crate can use this to implement
`Frame::symbol_address`, which is used to skip frames
above the call to `Backtrace::capture` on the stack.
The function pointer will not be useable for comparison purposes if the
function is generic, as CTFE creates a new function pointer for each
cast of a (monomorphized) generic function. However, this already
affects code running under Miri, and isn't a problem for `backtrace-rs`
(which only casts a non-generic function).
I've added logic to allow `MiriFrame` to have either 4 or 5 fields - if
a 5th field is present, we write the function pointer to it.
2020-10-10 13:07:57 -04:00
Aaron Hill
8e8828259a
Use macro callsite spans in backtrace
...
This mirrors what we do in the debuginfo used for runtime backtraces.
2020-10-05 17:29:55 -04:00
Ralf Jung
3aaab3dd98
more punctuation
2020-10-04 23:07:19 +02:00
Aaron Hill
c1c82c2503
Properly capitalize PathConversion
2020-10-04 16:28:09 -04:00
Aaron Hill
9e6320f101
Move convert_path_separator
to trait and use it in readlink
2020-10-04 12:34:13 -04:00
Aaron Hill
462f58298a
Make helper functions freestanding
2020-10-04 12:06:51 -04:00
Aaron Hill
8b89c7e1da
Use panicking coversions instead of as
2020-10-04 12:06:51 -04:00
Aaron Hill
186d59a3ec
Move some helper functions around
2020-10-04 12:06:51 -04:00
Aaron Hill
78bc89b4fc
Implement readlink
...
Due to the truncating behavior of `readlink`, I was not able to
directly use any of the existing C-cstring helper functions.
2020-10-04 12:06:51 -04:00
Ralf Jung
2b2a3a0cc1
check that all syscall arguments are scalars
2020-10-03 16:01:53 +02:00
Ralf Jung
b350c80a31
add backtics back in isolation error message
2020-10-03 15:25:30 +02:00
Mara Bos
68776d2921
Add FIXME about type of addr
in futex implementation.
...
Co-authored-by: Ralf Jung <post@ralfj.de>
2020-10-03 14:32:30 +02:00
Mara Bos
c268ee2bcb
Add note about use of force_ptr in futex implementation.
...
Co-authored-by: Ralf Jung <post@ralfj.de>
2020-10-03 14:21:37 +02:00
Mara Bos
dfcb46a4e0
Update syscall FIXME to include note about 'wrong' types.
2020-10-03 13:39:16 +02:00
Mara Bos
9d764c5750
Add FIXME note about variadic syscall().
2020-10-03 12:18:38 +02:00
Mara Bos
6df54c47a7
Use read_scalar_at_offset in futex_wait instead of memory.get_raw.
2020-10-03 12:11:24 +02:00
Mara Bos
66282754ff
Remove backtics from isolation error.
...
Otherwise `FUTEX_WAIT with timeout` will look weird.
2020-10-03 11:38:16 +02:00
Mara Bos
924fd56944
Only allow FUTEX_WAIT with timeout when isoloation is disabled.
2020-10-03 11:35:13 +02:00
Mara Bos
c9627b25fb
Use correct return type for syscall(SYS_futex).
2020-10-03 00:40:53 +02:00
Mara Bos
e64ead2f46
Implement timeouts for FUTEX_WAIT.
2020-10-02 23:34:14 +02:00
Mara Bos
d5b3f54b46
Use force_ptr in futex implementation.
2020-10-02 21:59:11 +02:00