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
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
Ralf Jung
0ece55d748
expand comment
2021-06-06 10:33:46 +02:00
hyd-dev
d7aff96053
Remove 2 tests
2021-06-06 11:22:25 +08:00
hyd-dev
879000b133
Detect std
by checking if the crate defines #[lang = "start"]
rather than string comparison
2021-06-06 11:12:05 +08:00
bors
28717a0e90
Auto merge of #1776 - hyd-dev:1170, r=RalfJung
...
Implement calls to exported symbols (#1170 )
Closes #1170 .
2021-06-03 15:59:56 +00:00
Pointerbender
386863ac53
added a strings.rs regression test case for potential future UB
2021-06-03 17:25:23 +02:00
hyd-dev
ba3b11fa42
Remove some tests
2021-06-03 14:16:58 +08:00
hyd-dev
e4e6c25f67
Remove FIXME in tests/compile-fail/panic/bad_unwind.rs
2021-06-03 13:39:33 +08:00
Pointerbender
c6dbe5cdca
use references so that potential aliasing bugs are triggered during regression test
2021-06-02 15:36:18 +02:00
Pointerbender
b8aba11de3
regression tests for pointer invalidation in core library slice methods
2021-06-02 15:36:18 +02:00
Aaron Hill
73700bc01c
Rustup for const_err changes
2021-05-31 10:50:25 -05:00
hyd-dev
a952787163
Improve tests
2021-05-31 11:57:16 +08:00
hyd-dev
45832d4031
Remove duplicated "foreign function"
2021-05-31 11:57:15 +08:00
hyd-dev
41f33a64f8
Implement calls to exported symbols
2021-05-31 11:15:29 +08:00
hyd-dev
71f4140550
Add -Zmiri-disable-abi-check
2021-05-31 11:14:23 +08:00
hyd-dev
9b2d42587f
unwind
is no longer Option<BasicBlock>
2021-05-28 22:08:51 +08:00
Ralf Jung
393ce98b32
fix a Stacked Borrows test whose output changed
2021-05-23 18:04:13 +02:00
Ralf Jung
dd404cc92e
avoid importing C functions in alloc_write_race test
2021-05-19 15:27:58 +02:00
Ralf Jung
801a1744cd
update for Memory API changes
2021-05-19 15:27:58 +02:00
Ralf Jung
7af7e9e4f3
rustup
2021-05-11 15:32:05 +02:00
hyd-dev
1ab9fd50a4
Update pointer error messages
2021-05-08 15:33:27 +08:00
Ralf Jung
a2b227f95a
stacked borrows: ensure array-to-elem casts behave correctly
2021-05-07 09:24:33 +02:00
hyd-dev
47c5b6eb08
encountered a NULL reference
-> encountered a null reference
2021-05-04 15:53:19 +08:00
Smitty
e0e59f6020
Simplify finiteness checking
2021-05-03 10:08:42 -04:00
Smitty
68d29554a8
test for infinite value in f*_fast
2021-05-03 09:56:51 -04:00
Smitty
e591b83185
UB if f*_fast intrinsic called with nonfinite value
2021-05-02 12:25:00 -04:00
hyd-dev
2da6bedaec
Use harness = false
instead of #![feature(custom_test_frameworks)]
2021-05-01 22:28:33 +08:00
hyd-dev
b30c5fef5b
Rustup for rust-lang/rust#84401
2021-04-30 19:35:59 +08:00
Ralf Jung
4c741e5fb2
rustup
2021-04-25 16:57:48 +02:00
Ralf Jung
2ae699c56d
make TLS-drop-test more cross-platform
2021-04-20 09:59:26 +02:00
Ralf Jung
d512ba2ae2
test thread_local_const_init
2021-04-18 11:01:08 +02:00
Charles Lew
85f7dd6131
Remove main_fn.rs
test.
2021-04-17 00:04:09 +08:00
Aliénore Bouttefeux
648638976a
allow deref of null ptr in test
2021-04-15 10:00:39 +02:00
Ralf Jung
0674d439b6
test calling pthread_cond_timedwait with an already elapsed timeout
2021-04-11 14:21:42 +02:00
Ralf Jung
21968aa53b
add test to detect dropped temporary
2021-04-10 12:09:10 +02:00
hyd-dev
3dff1d4fcd
Don't use MIRI_DEFAULT_ARGS
to compile host crates
2021-04-09 00:57:59 +08:00
Ralf Jung
31bd77c7d8
bump miri dependencies
2021-04-04 11:48:20 +02:00
Ralf Jung
de0f3f930b
rustup
2021-03-28 01:36:41 +01:00
Ralf Jung
585e51aabd
disable MIR opts for ZST-related tests
2021-03-25 12:44:30 +01:00
Ralf Jung
b4b048cc86
rustup; better comment in storage_dead_dangling test
2021-03-22 12:35:30 +01:00
hyd-dev
633ac2a222
Remove meaningless tests
2021-03-17 21:55:45 +08:00
hyd-dev
bbc348539b
Unsupported foreign non-"C"/"system"-ABI function calls are not UB
2021-03-17 21:20:04 +08:00
bors
0788188c7b
Auto merge of #1743 - RalfJung:callee-checks, r=RalfJung
...
Check callee ABI when Miri calls closures
Fixes https://github.com/rust-lang/miri/issues/1741
2021-03-14 18:05:18 +00:00
Ralf Jung
15465a5881
don't ICE when we unwind despite panic=abort
2021-03-14 17:10:45 +01:00
Ralf Jung
c9ff02f549
ensure we catch incorrectly unwinding calls
2021-03-14 17:03:20 +01:00
Ralf Jung
d1dec9cd23
don't ICE when callee has the wrong number of arguments
2021-03-14 15:38:22 +01:00
Ralf Jung
893843fd45
when Miri calls a function ptr, make sure it has the right ABI
2021-03-14 15:30:37 +01:00
Ralf Jung
98f28ac9c8
rustup
2021-03-11 09:07:05 +01:00