Vytautas Astrauskas
82f17ab917
Implement basic support for concurrency (Linux only).
2020-04-27 14:23:32 -07:00
David Cook
bc54c7628d
Eagerly compute i32 and u32 layouts
2020-04-05 16:03:44 -05:00
David Cook
ac8c98da8e
Store layouts of i32 and u32 inside Evaluator
2020-04-05 10:37:57 -05:00
David Cook
dd9896b0f8
Implement mutex and rwlock functions
2020-04-05 10:03:22 -05:00
Ralf Jung
8948a29a4c
adjust for librustc rename; reduce 'extern crate' to rustc crates
2020-03-30 11:07:32 +02:00
bors
ad14b684cc
Auto merge of #1275 - JOE1994:move_string_helpers, r=RalfJung
...
move OsStr helpers to a separate file
Moved OsStr read/write functions from `src/helpers.rs` to `src/shims/os_str.rs`, in order to keep `src/helpers.rs` from bloating too much.
2020-03-28 15:32:16 +00:00
JOE1994
99600ba7a9
move OsStr helpers to a separate file
2020-03-28 10:43:47 -04:00
Ralf Jung
204c13b8c7
env shim: make sure we clean up all the memory we allocate
2020-03-28 11:06:56 +01:00
Ralf Jung
6dcca62b63
move -Zmiri-disable-isolation hint to help
2020-03-22 19:48:59 +01:00
Ralf Jung
5531a79f4c
rustup, test Abort terminator
2020-03-12 20:48:04 +01:00
Ralf Jung
cc1ebd0af6
some formatting
2020-03-01 10:29:05 +01:00
Ralf Jung
ea5aa19487
rustup
2020-03-01 10:22:13 +01:00
bors
c0934e1eca
Auto merge of #1152 - divergentdave:shim-directory, r=RalfJung
...
Add directory-related shims
This PR adds support for `mkdir`, `rmdir`, `opendir`, `closedir`, and `readdir64_r`.
Open directory streams are tracked through a HashMap indexed by pointer locations, which holds directory iterators. Since `DIR` is an opaque type in glibc, I represent them with 1-byte allocations, and then just use their pointers in HashMap lookups.
Tests are included to exercise the new functionality.
2020-02-26 14:15:55 +00:00
Ralf Jung
274ae0438f
add an option to disable Stacked Borrows
2020-02-24 16:22:02 +01:00
David Cook
d7c3f588eb
Add shims for opendir and closedir
2020-02-23 15:02:49 -06:00
David Cook
a6a8f09f1e
Address review comments
2020-02-17 22:24:33 -06:00
Ralf Jung
6ff5b3fcf9
make sure we also trigger debug assertions in libstd
2020-02-16 13:55:51 +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
96d6efdf32
Emit errors without halting interpretation
2020-01-08 12:37:25 +01:00
Oliver Scherer
4411903cca
Add a scheme for registering and obtaining errors even without access to an InterpCx
2020-01-08 12:37:25 +01:00
Oliver Scherer
4de031b3da
Move error reporting to its own module
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
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