Commit Graph

3634 Commits

Author SHA1 Message Date
Ralf Jung
f16f891191 slice matching overflow got fixed 2019-11-20 19:38:41 +01:00
Aaron Hill
3102129316
Improve return code propagation.
Don't explicitly exit if we reported an evaluation error
2019-11-20 12:43:10 -05:00
Aaron Hill
2532b86a3b
Propagate the return code from the start lang item
Fixes #1064

This ensures that we set the error code properly when a panic unwinds
past `main`.

I'm not sure what the best way to write a test for this is
2019-11-19 17:25:09 -05:00
bors
11603c4657 Auto merge of #1063 - RalfJung:panic-abort, r=RalfJung
rename panic=abort tests to panic_abort
2019-11-19 21:47:13 +00:00
Ralf Jung
5cef4666e6 rename panic=abort tests to panic_abort 2019-11-19 22:44:07 +01:00
bors
e588d9535c Auto merge of #693 - Aaron1011:feature/panic_unwind_final, r=oli-obk
Support unwinding after a panic

Fixes #658

This commit adds support for unwinding after a panic. It requires a
companion rustc PR to be merged, in order for the necessary hooks to
work properly.

Currently implemented:
* Selecting between unwind/abort mode based on the rustc Session
* Properly popping off stack frames, unwinding back the caller
* Running 'unwind' blocks in Mir terminators

Not yet implemented:
* 'Abort' terminators

This PR was getting fairly large, so I decided to open it for review without
implementing 'Abort' terminator support. This could either be added on
to this PR, or merged separately.

I've a test to exercise several different aspects of unwind panicking. Ideally, we would run Miri against the libstd panic tests, but I haven't yet figured out how to do that.

This depends on https://github.com/rust-lang/rust/pull/60026
2019-11-19 21:07:26 +00:00
Aaron Hill
6fe89e45f4
Disable #[should_panic] test on Windows
We should re-enable this once
https://github.com/rust-lang/miri/issues/1059 is fixed
2019-11-19 15:59:42 -05:00
Aaron Hill
2750f60d4f
Update panic runtime comment 2019-11-19 15:33:14 -05:00
Aaron Hill
e02dc4af4b
Re-add comment 2019-11-19 15:31:37 -05:00
bors
9e13cba07b Auto merge of #1062 - RalfJung:readme, r=RalfJung
generalize readme

We didn't mean any specific date, that was just an example.
2019-11-19 19:40:55 +00:00
Ralf Jung
a4eb34b3e1 generalize readme 2019-11-19 20:40:06 +01:00
Aaron Hill
8936d67e7f
Delegate to the actual panic runtime crate 2019-11-19 10:11:25 -05:00
Ralf Jung
82374ad9bd comments and slight refactoring 2019-11-19 14:51:08 +01:00
bors
cf65c0cca6 Auto merge of #1060 - RalfJung:compiletest, r=RalfJung
bump compiletest; remove unused feature
2019-11-18 14:12:01 +00:00
Ralf Jung
52b18b44f9 bump compiletest; remove unused feature 2019-11-18 15:10:17 +01:00
Aaron Hill
80f9484c86
Disable panic tests on Windows
Miri currently does not support `GetProcAddress`
and `GetModuleHandleW`, both of which end up getting invoked by the
libstd panic hook.
2019-11-17 13:49:31 -05:00
Aaron Hill
660cd55cc7
Update captured test output 2019-11-17 11:49:31 -05:00
Aaron Hill
b5235dea7f
Add #[should_panic] test 2019-11-17 11:09:16 -05:00
Aaron Hill
b06d99b8a0
Ignore '-C panic=abort' tests for now
We are currently building `libpanic_abort` with the wrong panic
strategy, due to Xargo missing a hack used by `bootstrap`.
2019-11-17 08:40:34 -05:00
Aaron Hill
08d3fbc76b
Support unwinding after a panic
Fixes #658

This commit adds support for unwinding after a panic. It requires a
companion rustc PR to be merged, in order for the necessary hooks to
work properly.

Currently implemented:
* Selecting between unwind/abort mode based on the rustc Session
* Properly popping off stack frames, unwinding back the caller
* Running 'unwind' blocks in Mir terminators

Not yet implemented:
* 'Abort' terminators

This PR was getting fairly large, so I decided to open it for review without
implementing 'Abort' terminator support. This could either be added on
to this PR, or merged separately.
2019-11-17 08:34:25 -05:00
bors
67a63f89d8 Auto merge of #1056 - RalfJung:max, r=RalfJung
use new isize_max method in FS accesses

also check full buffers for validity
2019-11-17 08:55:02 +00:00
Ralf Jung
5345636f37 use new isize_max method in FS accesses; also check full buffers for validity 2019-11-17 09:54:09 +01:00
bors
9f1aec34e1 Auto merge of #1055 - RalfJung:panic-stub, r=RalfJung
minimal rustup for panic changes

Main patch by @Aaron1011
2019-11-17 08:21:42 +00:00
Ralf Jung
f2c0c44a09 remove some leftovers from the miri-control-attribute days 2019-11-17 09:20:50 +01:00
Ralf Jung
4712ed3ff5 rustup again 2019-11-17 09:03:16 +01:00
Ralf Jung
08fe5ee78c try the stable feature of compiletest 2019-11-16 09:08:30 +01:00
Ralf Jung
68bc7e077b bump Rust 2019-11-16 09:00:05 +01:00
bors
abab0207af Auto merge of #1054 - RalfJung:win-num-cpus, r=RalfJung
test-cargo-miri: cargo update, re-enable windows num_cpus test
2019-11-15 15:00:28 +00:00
Ralf Jung
524624297d test-cargo-miri: cargo update, re-enable windows num_cpus test 2019-11-15 15:59:19 +01:00
bors
2bdf163d69 Auto merge of #1053 - RalfJung:clean, r=RalfJung
remove no-longer-needed zero checks
2019-11-14 10:16:51 +00:00
Ralf Jung
c790317eb9 remove no-longer-needed zero checks 2019-11-14 10:30:00 +01:00
bors
bf96b47d13 Auto merge of #1052 - RalfJung:icefix, r=RalfJung
fix ICE due to dangling pointers in Stacked Borrows

Fixes https://github.com/rust-lang/miri/issues/1050. Thanks to @CAD97 for the report!
2019-11-14 09:27:03 +00:00
Ralf Jung
64244e9a18 do full deref-check before reborrowing 2019-11-14 10:24:02 +01:00
Ralf Jung
82ef2bb0e2 rename miri-issue to issue-miri for grouping 2019-11-14 10:16:44 +01:00
bors
09b0a8a813 Auto merge of #1022 - christianpoveda:fix-fd-access, r=RalfJung
Fix unchecked memory access for files

This PR takes care of two problems:

- It uses `Memory::(read|write)_bytes` to guarantee that memory accesses are checked (Fixes: https://github.com/rust-lang/miri/issues/1007)
- It removes the `(get|remove)_handle_and` methods which were a little bit cumbersome to use. In particular `remove_handle_and`, because we were using it to avoid borrowing issues before the `Evaluator::memory` field was public.

@RalfJung @oli-obk
2019-11-13 22:58:24 +00:00
Christian Poveda
4baef7120a Fix maximum isize value for target 2019-11-13 14:45:00 -05:00
Christian Poveda
edd0157069 Cap count twice 2019-11-13 11:57:20 -05:00
bors
69415b48e2 Auto merge of #1049 - silathdiir:copysignf32-and-copysignf64, r=RalfJung
Implment intrinsics::copysignf32 and intrinsics::copysignf64

Tries to implment `intrinsics::copysignf32` and `intrinsics::copysignf64` for fixing Issue #1046 .
2019-11-13 09:42:47 +00:00
Steven Gu
ca983f5f80 Implments intrinsics::copysignf32 and intrinsics::copysignf64. 2019-11-13 17:41:09 +08:00
Aaron Hill
cf5b53e52f
Rustup for panic changes
This gets Miri working again, but doesn't actually implement unwinding
2019-11-12 19:52:15 -05:00
bors
86f473810a Auto merge of #1047 - RalfJung:uprust, r=RalfJung
rustup
2019-11-11 20:26:37 +00:00
Ralf Jung
2c55a508e9 rustup 2019-11-11 21:25:57 +01:00
Christian Poveda
6e37f2f3e1 Cap count 2019-11-09 15:15:52 +01:00
Christian Poveda
10b93730d3 Fix merge conflicts 2019-11-09 10:42:45 +01:00
bors
8355437d5d Auto merge of #1044 - RalfJung:uprust, r=RalfJung
rustup
2019-11-08 21:08:52 +00:00
Ralf Jung
37b1190def rustup 2019-11-08 22:07:52 +01:00
bors
9316d90315 Auto merge of #1040 - RalfJung:rustup, r=RalfJung
rustup
2019-11-08 17:49:38 +00:00
bors
1fb857dcb0 Auto merge of #1043 - RalfJung:cache, r=RalfJung
Cache rustup-toolchain-install-master again

We temporarily disabled the cache just to get it updated.
2019-11-08 15:38:06 +00:00
Ralf Jung
9ca277f2e9 bump minimal xargo version so that it honors the lockfile 2019-11-08 16:36:57 +01:00
Ralf Jung
d518c38219 rust-docs should be gone from all caches now 2019-11-08 14:13:23 +01:00