Commit Graph

293 Commits

Author SHA1 Message Date
bors 2bbb70f584 Auto merge of #2203 - RalfJung:deprecate, r=oli-obk
deprecate -Zmiri-allow-uninit-numbers and -Zmiri-allow-ptr-int-transmute

Cc https://github.com/rust-lang/miri/issues/2187 https://github.com/rust-lang/miri/issues/2188
2022-06-13 10:23:42 +00:00
Ralf Jung b64c9a0a83 make scheduler preemptive, with configurable preemption rate 2022-06-06 20:16:02 -04:00
Ralf Jung 14913e993b deprecate -Zmiri-allow-uninit-numbers and -Zmiri-allow-ptr-int-transmute 2022-06-06 16:07:30 -04:00
Andy Wang 5ddd4eff03 Spelling, punctuation and grammar
Co-authored-by: Ralf Jung <post@ralfj.de>
2022-06-06 19:15:56 +01:00
Andy Wang 62b514e235 Update README 2022-06-06 19:15:24 +01:00
Andy Wang bf7fe68fba Add -Zmiri-disable-weak-memory-emulation to README 2022-06-06 19:15:22 +01:00
Ralf Jung 625b4ed341 fix dangling reference in the README 2022-06-03 14:48:45 -04:00
Ralf Jung 1226147414 rustup 2022-05-28 18:08:13 +02:00
Ralf Jung 8c42ef1dee enable number validity checking and ptr::invalid checking by default 2022-05-25 16:17:41 +02:00
Oli Scherer f1756c3ddd Add a custom ui test runner and move all tests to it 2022-05-25 13:31:26 +00:00
Ralf Jung 4d9eafe19a fix some old typos 2022-05-23 11:24:08 +02:00
Ralf Jung a3a2a474cb split flag section into common and advanced flags 2022-05-23 10:15:34 +02:00
Ralf Jung f8f2255a91 readme: document permissive-provenance flag 2022-05-23 09:07:32 +02:00
Ralf Jung aadbe8fd45 explain which targets we support to what extent 2022-05-20 23:41:55 +02:00
Ralf Jung 3b73eb4456 explain what we mean by 'unsound' 2022-05-20 23:41:55 +02:00
bors 36c274aa38 Auto merge of #2084 - rust-lang:silence, r=RalfJung
Add a command line flag to avoid printing to stdout and stderr

This is practical for tests that don't actually care about the output and thus don't want it intermingled with miri's warnings, errors or ICEs

fixes #2083
2022-05-10 07:24:07 +00:00
Oli Scherer 6dc6256413 Wording nit 2022-05-10 07:23:50 +00:00
Oli Scherer c8b947a5ed Use alphabetical order for miri flags 2022-05-10 07:23:03 +00:00
Ralf Jung 9bb4410d3a tweak MIRI_SYSROOT docs 2022-05-05 10:28:40 +02:00
Ralf Jung 1e49078a54 mention some papers that use Miri 2022-05-01 13:44:12 +02:00
David Tolnay 0bdf91ddc7 Update GitHub Actions actions/checkout@v2 to v3
The v2 implementation uses Node 12, which is end-of-life on April 30, 2022.
See https://nodejs.org/en/about/releases/. Update to v3, which is based on
Node 16 whose support lasts until April 30, 2024.
2022-04-29 20:25:04 -07:00
Oli Scherer 5e26cdaf3a Add readme entry 2022-04-26 09:36:02 +00: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
Ralf Jung efe871f208 readme 2022-04-16 09:17:01 -04:00
Ralf Jung 1d79b60a1e make strict-provenance imply check-number-validity 2022-04-01 23:59:16 -04:00
Ralf Jung 9af03bf342 add -Zmiri-strict-provenance 2022-04-01 14:10:24 -04:00
bors 57786678d4 Auto merge of #1975 - DrMeepster:backtrace_fix, r=RalfJung
Make backtraces work with #[global_allocator]

Currently, backtraces break when the global allocator is overridden because the allocator will attempt to deallocate memory allocated directly by Miri.

~~This PR fixes that by using a new memory kind and providing a function to deallocate it. We can't call the custom allocator to allocate because it's not possible to call a function in the middle of a shim.~~

This PR fixes that by adding a new version of the backtrace API accessible by setting `flags` to 1. Existing code still functions.

backtrace-rs PR: rust-lang/backtrace-rs#462

Fixes https://github.com/rust-lang/miri/issues/1996
2022-03-20 02:37:09 +00:00
DrMeepster 2c670b10df add new version of backtrace api using flags=1 2022-03-19 18:14:11 -07:00
Ben Kimock 65125df1cd Consider the cargo workspace when checking if a frame is local 2022-03-18 16:28:13 -04:00
bors a12a48bf72 Auto merge of #2018 - RalfJung:term, r=oli-obk
exclude TERM env var by default

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

r? `@oli-obk`
2022-03-12 19:12:53 +00:00
Ralf Jung 3c5cb89f63 exclude TERM by default 2022-03-12 10:14:07 -05:00
Ralf Jung 9a6450af95 also accept odd number of hex digits; add README section on randomized alignment testing 2022-03-12 10:09:15 -05:00
Ralf Jung c03575275a update recommended CI snippet, add GHA example 2022-03-07 12:03:51 -05:00
Ralf Jung 3adc203c1c add flag to forward specific env vars (while isolation remains enabled) 2022-03-05 11:14:37 -05:00
Ben Kimock 0bd83245ed rkyv deallocation alignment issue 2022-03-03 13:10:05 -05:00
Ben Kimock a20d1f1889 Add crossbeam-epoch and integer-encoding to the trophy case 2022-02-22 21:09:30 -05:00
Ralf Jung a21c98a896 another for the trophy case 2022-02-20 21:41:37 -05:00
Ralf Jung e51810df2c add and document MIRI_LIB_SRC env var to set the source from which Miri builds the standard library 2021-12-23 16:04:09 +01:00
Ralf Jung db74c1c030 readme: be more explicit about the toolchain 2021-12-19 17:46:17 +01:00
Ralf Jung d8bee92aee rename track-raw-pointers flag to tag-raw-pointers 2021-11-13 15:48:27 -05:00
Noah Lev 1659ef4206 Add docs for -Zmiri-check-number-validity 2021-11-10 11:36:42 -08:00
Martin Habovštiak 782085adcd Remove vague statement from README
Addresses https://github.com/rust-lang/miri/pull/1898#discussion_r727274293
2021-10-12 18:46:23 +02:00
Martin Habovštiak 31ed3a7120 Typo fixes
Co-authored-by: Ralf Jung <post@ralfj.de>
2021-10-12 11:09:43 +02:00
Martin Habovštiak 0309de73dc Document threading support a bit more
This adds a few known limitations around threading to the README and suggests the users to look into GitHub issues to learn more.
2021-10-09 22:19:14 +02:00
Ralf Jung 71efd950d1 also ignore 'thread leaks' with -Zmiri-ignore-leaks 2021-07-25 14:21:06 +02:00
bors 83dd2d7b1f Auto merge of #1830 - RalfJung:readme, r=RalfJung
tweak isolation-error message in README
2021-06-09 19:12:17 +00:00
Ralf Jung 87f2073c80 tweak isolation-error message in README 2021-06-09 21:09:17 +02:00
bors e5c3af6f51 Auto merge of #1818 - landaire:feature/panic-on-unsupported-syscalls, r=RalfJung
Add support for panicking in the emulated application when unsupported functionality is encountered

This PR fixes #1807 and allows an optional flag to be specified to panic when an unsupported syscall is encountered. In essence, instead of bubbling up an error in the context of the Miri application Miri will panic within the context of the *emulated* application. This feature is desired to allow CI pipelines to determine if a Miri failure is unsupported functionality or actual UB. Please read [this comment](https://github.com/rust-lang/miri/issues/1807#issuecomment-845425076) for the rationale behind this change.

Note: this change does not cover all cases where unsupported functionality errors may be raised. If you search the repo for `throw_unsup_format!` there are many cases that I think are less likely to occur and may still be problematic for some folks.

TODO:

- [x] README documentation on this new flag
- [x] Add tests
2021-06-09 18:09:06 +00:00
Smit Soni 892f706ce5 Add a support to execute isolated op without halting
In user interface, added a new flag `-Zmiri-isolation-error` which
takes one of the four values -- hide, warn, warn-nobacktrace, and
abort. This option can be used to configure Miri to either abort or
return an error code upon executing isolated op. If not aborted, Miri
prints a warning, whose verbosity can be configured using this flag.

In implementation, added a new enum `IsolatedOp` to capture all the
settings related to ops requiring communication with the
host. Old `communicate` flag in both miri configs and machine
stats is replaced with a new helper function `communicate()` which
checks `isolated_op` internally.

Added a new helper function `reject_in_isolation` which can be called
by shims to reject ops according to the reject_with settings. Use miri
specific diagnostics function `report_msg` to print backtrace in the
warning. Update it to take an enum value instead of a bool, indicating
the level of diagnostics.

Updated shims related to current dir to use the new APIs. Added a new
test for current dir ops in isolation without halting machine.
2021-06-09 05:50:52 -07:00
Kitsu c6bcb4d3c0 Specify miri toolchain for CI example 2021-06-09 10:48:43 +03:00