Commit Graph

65 Commits

Author SHA1 Message Date
Oliver Scherer
817f4159a2 Use the machine stop error instead of abusing other error kinds 2019-12-09 14:29:28 +01:00
Oliver Scherer
eab2538317 Rename track-id to track-pointer-tag 2019-12-08 12:20:51 +01:00
Oliver Scherer
d363a47fcb Add a scheme to find the place where an id was destroyed 2019-12-08 12:20:51 +01:00
Ralf Jung
e92d16d9cd add flag to ignore memory leaks 2019-12-07 13:44:48 +01:00
Ralf Jung
94732aaf7b rename helper methods a bit 2019-12-04 10:43:36 +01:00
Ralf Jung
808ac8f4b9 use write_os_str_to_c_string for unix arg passing 2019-12-04 09:58:10 +01:00
Ralf Jung
8e3c3eccc4 panic errors are actually still possible 2019-12-02 16:04:31 +01:00
Ralf Jung
d43e394c46 fix init_allocation_extra 2019-12-02 16:04:31 +01:00
Ralf Jung
e77258322c some error classes should be impossible 2019-12-02 16:04:31 +01:00
Ralf Jung
b2cddd27bd better span for functions whose frame we push 'manually' 2019-12-02 16:04:31 +01:00
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