Commit Graph

38 Commits

Author SHA1 Message Date
Ralf Jung
833dff994f rustup 2021-07-07 09:33:01 +02:00
hyd-dev
2644647053
Update backtraces 2021-06-20 15:12:11 +08:00
hyd-dev
4f3718ef85
Fix the wrong EmulateByNameResult::NotSupported in syscall shim 2021-06-11 11:44:57 +08: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
hyd-dev
23c0495ebd
Update Box<Any> to Box<dyn Any> in catch_panic.stderr 2021-06-08 22:18:27 +08:00
Lander Brandt
ae237098f8 Add support for panicking in the emulated application when unsupported syscalls are encountered 2021-06-07 15:21:53 -07:00
Mara Bos
90e218ad90 Fix panic test. 2021-03-08 17:06:50 +01:00
Mara Bos
5bd5ea21ea Remove unwrap_none as it won't be stabilized.
This upgrades to the latest rustc to be able to use try_insert()
instead.
2021-03-08 16:59:20 +01:00
Mara Bos
7fc24442bd Update rust version.
- Allow new non_fmt_panic lint in test.
- Remove stabilized feature(wake_trait).
2021-02-05 10:08:05 +01: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
69fb6413dd Tidy up comments and function layout, should fix most of the review notes. 2020-11-15 18:30:26 +00:00
JCTyBlaidd
ed32b260f9 Add tests, and fix bug in atomic RMW relaxed stores 2020-11-02 02:57:06 +00:00
Ralf Jung
e7246be4f0 backtrace tests: support more ways of checking out Rust locally 2020-10-31 13:47:42 +01:00
Ralf Jung
1044099c19 disable debug assertions in the standard library 2020-10-28 12:43:11 +01:00
Ralf Jung
ddcc4f241e rustup; make panic output less dependent on stdlib internals 2020-10-25 10:00:50 +01:00
Aaron Hill
05bb560de2
Enable backtrace feature in the generated Xargo.toml
This allows the normal std panic hook to print a backtrace if
`RUST_BACKTRACE=1` and `-Z miri-disable-isolation` are set
2020-10-20 18:27:55 -04:00
David Cook
da2f268443 Review comments 2020-08-31 19:32:14 -05:00
David Cook
3ba7f46058 Move panic payload state from Machine to Thread 2020-08-29 21:38:37 -05:00
Ralf Jung
0913653e06 make sure we test panic of interpreter-impelemted align_offset 2020-08-16 18:31:48 +02:00
Ralf Jung
ee39ac9840 rustup for new folder layout 2020-07-29 14:27:14 +02:00
Ralf Jung
cae90b6d29 rustup and test fixes 2020-07-27 23:40:27 +02:00
Ralf Jung
e54619b5e1 with this, we support panics on Windows 2020-06-27 14:43:37 +02:00
Ralf Jung
2940da9d1f bump Rust 2020-06-20 11:48:42 +02:00
Ralf Jung
f462b4c257 memory reachable through globals is not a leak any more; adjust for better memory dumping 2020-04-07 19:03:41 +02:00
Elichai Turkel
0826899ca0
Remove uninhabit/zeroed tests to a new test file for abort checking 2020-03-18 14:14:23 +02:00
Ralf Jung
548c90e102 share some code between panic intrinsics, and fix the message 2020-03-11 19:53:07 +01:00
Elichai Turkel
2802c3cf0b
Add tests for the new panic_if_any_invalid, panic_if_zero_invalid intrinsics 2020-03-11 16:02:49 +02:00
Ralf Jung
8394456247 properly panic in panic_if_uninhabited and align_offset shims 2020-03-08 20:00:40 +01:00
Ralf Jung
148269dd4b finally stop using min/max_value and the integer modules 2020-03-04 13:01:06 +01:00
Ralf Jung
627d7cba64 fix for const-prop lint changes 2020-02-21 10:33:00 +01:00
Ralf Jung
6ff5b3fcf9 make sure we also trigger debug assertions in libstd 2020-02-16 13:55:51 +01:00
Ralf Jung
39a78f0b24 make sure assertions and debug-assertions also panic (and can be caught) 2020-02-16 13:47:31 +01:00
Ralf Jung
833816dd35 Unwind panicking does not currently work on Windows 2020-01-09 11:41:08 +01:00
Ralf Jung
e9b4323048 also make sure the hook actually gets called 2020-01-09 11:24:41 +01:00
Ralf Jung
b1676a3e89 test that unwrap gets us the right panic location 2020-01-09 11:20:13 +01:00
Ralf Jung
74ef63ff0a the never type got de-stabilized again; adjust tests 2019-12-15 12:23:43 +01:00
Ralf Jung
ce7b44b048 ignore another panicking test on Windows 2019-12-02 16:48:18 +01:00
Ralf Jung
ae53b1222a fix and expand panic tests 2019-12-02 16:04:31 +01:00