Christian Poveda
18a71ef7b3
minor corrections
2020-03-07 11:35:00 -05:00
Christian Poveda
4f5fdc5810
update the environ shim when environment changes
2020-03-06 08:21:52 -05:00
Christian Poveda
d13fe01f82
add working shim for environ
2020-03-06 08:19:56 -05:00
Ralf Jung
d82d701360
add option to track a particular AllocId (does nothing yet)
2020-03-06 09:06:23 +01:00
Ralf Jung
8ef303cd32
port from find_foreign_static to canonical_alloc_id
2020-03-02 09:03:08 +01:00
Ralf Jung
5d8fbfcb5f
rename memory kind: Env -> Machine
2020-03-02 09:01:23 +01:00
Ralf Jung
cc1ebd0af6
some formatting
2020-03-01 10:29:05 +01:00
Ralf Jung
25ddc659d0
move validate field from memory to machine
2020-02-24 16:25:29 +01:00
Ralf Jung
274ae0438f
add an option to disable Stacked Borrows
2020-02-24 16:22:02 +01:00
Ralf Jung
4a9a0a9078
avoid lowercasing platforms
2020-02-23 18:54:08 +01:00
Oliver Scherer
dbffbe5214
Document all the things
2020-01-09 12:42:56 +01:00
Oliver Scherer
c69ebaaed2
Use names that actually represent what's going on
2020-01-08 13:43:23 +01:00
Oliver Scherer
90a8f2f6a3
Make the non-halting diagnostic scheme independent of InterpError
2020-01-08 13:02:55 +01:00
Oliver Scherer
aec175e0de
Process delayed errors on every step
2020-01-08 12:49:46 +01:00
Oliver Scherer
4de031b3da
Move error reporting to its own module
2020-01-08 12:37:25 +01:00
Oliver Scherer
2673ba99fd
Trailing return
2020-01-08 12:37:25 +01:00
Oliver Scherer
b9f6b9721a
Split error reporting from main eval function
2020-01-08 12:37:25 +01:00
Yuki Okushi
86ee705cd5
Rustup
2020-01-07 05:13:18 +09:00
Yuki Okushi
ebacb8ae4e
Rustup
2020-01-05 15:55:15 -08:00
Ralf Jung
e325ad24f2
support main functions with Result return type
2019-12-23 17:45:23 +01:00
Oliver Scherer
7ead530841
Rustfmt all the things
2019-12-23 12:56:23 +01:00
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
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