Ralf Jung
b91383b068
implement proper panicking for other MIR assertions
...
Requires generalizing the call_function helper to arbitrary Immediate arguments
2019-12-02 16:04:31 +01:00
Ralf Jung
dcdd68b936
also indicate abort via new MachineStop variant
2019-12-02 09:13:58 +01:00
Ralf Jung
f3c00a447c
use new MachineStop error variant
2019-12-02 09:05:35 +01:00
Ralf Jung
e5a81c6a2d
fix comment
2019-11-29 11:08:27 +01:00
Ralf Jung
fe76d33506
Add and use helper function for calling a machine function and passing it some arguments
2019-11-29 09:23:29 +01:00
Ralf Jung
a04620eb69
only run leak test on clean platforms
2019-11-27 09:13:37 +01:00
Aaron Hill
2176bf6cf0
Fix nits
...
Co-Authored-By: Ralf Jung <post@ralfj.de>
2019-11-20 13:52:04 -05: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
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
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
YOUNGSUK KIM
e5675ab0fc
follow-up to review
2019-11-06 08:25:00 -05:00
YOUNGSUK KIM
2661295cdf
error code E0080 is no longer printed with MIRI error message
2019-11-05 21:56:18 -05:00
Ralf Jung
ddb1fc9205
store scalars where appropriate
2019-11-02 11:50:21 +01:00
Ralf Jung
1e0b398cb6
Windows cmdline: avoid accessing allocations directly
2019-11-02 11:48:28 +01:00
Ralf Jung
354de02c24
rustup; fix debugging
2019-10-23 16:33:54 +02:00
Ralf Jung
2690f5948a
rustup: fix for write_bytes and new union rules
2019-10-22 10:13:11 +02:00
Christian Poveda
ed776f67ba
Change last_error to a place
2019-10-20 07:42:59 -05:00
Ralf Jung
88c88530ec
use expect_none and unwrap_none where it makes sense
2019-10-20 12:20:48 +02:00
Ralf Jung
e574c77aa2
audit our bounds checks
2019-10-19 12:39:02 +02:00
Ralf Jung
5481afbaf6
cleanup now that borrow checker knows memory is a field
2019-10-18 11:33:12 +02:00
Yuki Okushi
a353e90eed
Use memory field instead of memory()
2019-10-18 11:11:50 +09:00
Christian Poveda
11d7be9c6f
Move last_error into memory
2019-10-07 09:15:32 -05:00
Christian Poveda
905c70cfa5
Rustfmt
2019-10-07 09:12:30 -05:00
Ralf Jung
28e814ab53
rustup
2019-09-28 10:37:48 -04:00
Christian Poveda
abcda6dc94
Small corrections
...
Co-Authored-By: Ralf Jung <post@ralfj.de>
2019-08-29 03:08:58 -05:00
Christian Poveda
c1cec3b247
Exclude env vars using flag
2019-08-28 17:57:41 -05:00
Christian Poveda
1ae1d71938
Add -Zmiri-env-exclude flag
2019-08-28 17:57:35 -05:00
Ralf Jung
3a68d943ba
rustup
2019-08-27 08:32:31 +02:00
Ralf Jung
f9241be734
fix warning
2019-08-15 11:24:04 +02:00
Christian Poveda
41f8cfa30e
Move env shims to its own module
2019-08-14 16:30:55 -05:00
Christian Poveda
451a09a685
Remove tcx parameter for EnvVars::alloc_env_value
2019-08-14 13:54:57 -05:00
Christian Poveda
46f902b67d
Rename export for shims::env::EnvVars
2019-08-14 11:31:29 -05:00
Christian Poveda
afc6713e41
Reorganize shims::env::EnvVars
2019-08-13 16:17:41 -05:00
Christian Poveda
666cd22fa6
Wrap hashmap for env vars in its own type
2019-08-13 11:34:43 -05:00
Christian Poveda
b731a6a15f
Add support for env communication
2019-08-06 17:40:07 -05:00
Christian Poveda
068c448832
Add communicate field to evaluator and fix formatting
2019-08-06 15:44:44 -05:00
Christian Poveda
655f9af7fe
Add flag to enable communication
2019-08-06 15:18:22 -05:00
Ralf Jung
f65e7cd2d1
adjust for rustc changes
2019-08-03 20:31:33 +02:00
Ralf Jung
8071034b93
fix for error refactoring
2019-08-03 10:25:55 +02:00
Lzu Tao
e6a677fe63
build: Warn if not use 2018 idioms
2019-07-24 21:24:26 +07:00
Ralf Jung
068517ae66
make sure we always have an RNG
2019-07-23 21:38:53 +02:00
Ralf Jung
a2541aacd6
bump rust
2019-07-21 11:56:10 +02:00
Ralf Jung
e7b39e382a
reenable all tests on Windows
2019-07-11 18:41:53 +02:00
Ralf Jung
11686f4be2
we do this these days
2019-07-10 14:38:49 +02:00
Ralf Jung
f79f31dfa1
adjust for rustc changes; normalize mplace before doing freeze-sensitive visit
2019-07-10 14:36:56 +02:00
Ralf Jung
2ca1b94e6d
update to FnVal changes; implement basic Dlsym support and use it for getentropy
2019-07-06 10:07:21 +02:00
Ralf Jung
b324cbf282
Merge remote-tracking branch 'origin/master' into rustup
2019-07-06 09:29:17 +02:00
Ralf Jung
1729965808
rename InterpretCx -> InterpCx
2019-07-05 23:48:51 +02:00
Ralf Jung
4d76dd1f09
temporarily disable validation on Windows
2019-07-05 21:26:58 +02:00
Ralf Jung
eb4128fb42
don't call Stacked Borrows hooks at all when validation is disabled
2019-07-03 10:47:28 +02:00
Ralf Jung
c0b44ca98c
tweak inttoptr allocation behavior
...
- Make `align_addr` not offset by `align` for no reason.
- Add some random slack between allocations to give them the chance to not be aligned.
2019-06-29 14:31:54 +02:00
Ralf Jung
aa5a9bc152
some module comments
2019-06-29 14:15:05 +02:00
Ralf Jung
857305ff67
Merge remote-tracking branch 'ralf/machine' into rustup
2019-06-29 14:04:50 +02:00
Ralf Jung
67d3779b0c
move most of the stuff from lib.rs into machine.rs, and initialization + main loop into eval.rs
2019-06-29 13:48:59 +02:00