Commit Graph

220 Commits

Author SHA1 Message Date
Yuki Okushi
86ee705cd5 Rustup 2020-01-07 05:13:18 +09:00
Yuki Okushi
ebacb8ae4e Rustup 2020-01-05 15:55:15 -08:00
Oliver Scherer
7ead530841 Rustfmt all the things 2019-12-23 12:56:23 +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
8a36d12d36 implement proper panicking for failed index check 2019-12-02 16:04:31 +01:00
Ralf Jung
f3c00a447c use new MachineStop error variant 2019-12-02 09:05:35 +01: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
Ralf Jung
88c88530ec use expect_none and unwrap_none where it makes sense 2019-10-20 12:20:48 +02:00
Christian Poveda
8f4d185d1b Move time related functions to its own module 2019-10-11 11:39:31 -05:00
Christian Poveda
976c976f09 Rename shims::io to shims::fs 2019-10-11 01:49:28 -05:00
Christian Poveda
79b1f91f45 First version of file handling 2019-09-25 01:17:18 -05:00
Christian Poveda
41f8cfa30e Move env shims to its own module 2019-08-14 16:30:55 -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
Ralf Jung
56630e0ff0 bootstrap no longer carries a copy of these flags 2019-07-31 15:15:31 +02:00
Lzu Tao
e6a677fe63 build: Warn if not use 2018 idioms 2019-07-24 21:24:26 +07:00
Ralf Jung
4f6a56f54f better error message when the program tries to spawn a thread 2019-07-06 10:07:21 +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
93c62a4912 move tls.rs into shims module 2019-07-03 23:12:44 +02:00
Ralf Jung
7b702b9258 move find_fn (which is not specific to foreign items) out of foreign_items 2019-07-01 00:28:31 +02:00
Ralf Jung
b8879f3d8c move shims (foreign items and intrinsics) into submodule 2019-06-30 15:35:28 +02:00
Ralf Jung
019ad4bab4 move constants to machine.rs 2019-06-29 14:37:41 +02:00
Ralf Jung
c7bf9064f7 comment on STACK_ADDR 2019-06-29 14:34:08 +02:00
Ralf Jung
0fac868685 support num_cpus and test that 2019-06-29 14:34:08 +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
Christian Poveda
7fbf8e53a2 Fix alignment of base addresses 2019-06-26 09:08:28 -05:00
Christian Poveda
84cfbb01b7 Reorganize MemoryExtra and AllocExtra structures 2019-06-24 17:18:25 -05:00
Christian Poveda
2861ceb2fa Rename new fields and move rng to MemoryExtra 2019-06-24 10:03:16 -05:00
Christian Poveda
dd732e5862 Force intptrcast for binary operations 2019-06-22 09:25:16 -05:00
Christian Poveda
fd3a291db4 Implement intptrcast methods 2019-06-21 14:55:37 -05:00
Christian Poveda
4211d7e1a0 Update tag methods to match Machine changes 2019-06-20 16:58:57 -05:00
Lzu Tao
fd0dccd4b1 Fix wrong lifetime of TyCtxt
Rustup rust-lang/rust#61817
2019-06-15 02:34:11 +07:00
Ralf Jung
ad0c941547 rustup for lifetime refactorings 2019-06-13 09:18:03 +02:00
Ralf Jung
5e07ac335f implement min and max floating point intrinsics 2019-06-11 19:41:43 +02:00
Ralf Jung
446478cce2 fix for rustc rename mir -> body 2019-06-10 13:01:55 +02:00
Ralf Jung
d6bcfc58e3 rustup for EvalResult rename 2019-06-08 22:14:47 +02:00
Ralf Jung
0c704151f7 use new rustc infrastructure to tag the base pointer of static allocations 2019-06-02 22:16:02 +02:00
Ralf Jung
e4cee77121 fix for rustc changes 2019-05-29 09:30:36 +02:00
Ralf Jung
9b3f07b161 make printing return place less verbose 2019-05-15 17:23:33 +02:00
Ralf Jung
bc0c76d861 fix for latest rustc 2019-05-13 22:07:24 +02:00
Ralf Jung
0694435650 implement exit
implement exit code via new error kind
2019-04-21 12:36:17 +02:00
Ralf Jung
3f0a2a2941 rewrite Stacked Borrows Core. this passes stacked-borrows.rs! 2019-04-17 16:02:57 +02:00
Ralf Jung
5f29a53992 rustup 2019-04-12 12:32:26 +02:00
Ralf Jung
8de4f34a7f Merge remote-tracking branch 'origin/master' 2019-04-11 22:09:09 +02:00
Aaron Hill
0837d630f7
Some final cleanup 2019-04-09 15:49:34 -04:00
Ralf Jung
06af617b92 fix dumping uninitialized locals 2019-04-08 13:40:11 +02:00
Aaron Hill
73239573c9
Implement non-deterministc mode
Part of #653

This allows us to properly implement getrandom(),
which unlocks the default HashMap type (e.g. HashMap<K, V>)
with RandomState)

This commit adds a new '-Zmiri-seed=<seed>' option. When present,
this option takes a 64-bit hex value, which is used as the seed
to an internal PRNG. This PRNG is used to implement the 'getrandom()'
syscall.

When '-Zmiri-seed' is not passed, 'getrandom()' will be disabled.
2019-04-07 19:26:20 -04:00
kenta7777
d9178b9300 renames EvalContext to InterpretCx 2019-03-30 10:58:28 +09:00
Ralf Jung
687c5d13ea bump Rust; remove stabilized feature 2019-03-18 13:31:29 +01:00
Santiago Pastorino
0bb6ae8f62
Place::Local(x) is now Place::Base(PlaceBase::Local(x)) 2019-03-01 11:27:30 -03:00