Christian Poveda
459c65a4f9
Add method to consume io::Error
2019-10-08 08:18:51 -05:00
Christian Poveda
887d748114
Add __errno_location shim
2019-10-07 09:15:37 -05: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
Christian Poveda
6c36a8c949
Return earlier when reading/writing 0 bytes
2019-10-02 09:12:03 -05:00
Christian Poveda
f5022b19d3
Fix dangling pointer bug for zero-sized reads
2019-10-02 08:43:23 -05:00
Christian Poveda
78e0d309ef
Avoid early return after handles are removed
2019-10-01 14:07:45 -05:00
Christian Poveda
5a05c04c85
Correct name of each shim when erroring
2019-10-01 11:14:50 -05:00
Christian Poveda
cd495cb04f
Add file writing capabilities
2019-10-01 11:10:37 -05:00
Christian Poveda
d0509d719c
Add docs for helper functions
2019-10-01 10:31:04 -05:00
Christian Poveda
50be5a83c5
Remove return argument when fd is not found
2019-10-01 09:28:48 -05:00
Christian Poveda
644467c570
Add methods to handle invalid fides
2019-09-30 15:54:43 -05:00
Christian Poveda
efbe798e62
Avoid buffer allocation to read files
2019-09-30 14:21:45 -05:00
Christian Poveda
775246e329
Add method to consume std::io::Result
2019-09-30 14:08:12 -05:00
Christian Poveda
03ed4123c0
Add FileHandle struct
2019-09-30 11:51:09 -05:00
Christian Poveda
b540e5d24e
Reserve fides for stdio and fix merge issues
2019-09-30 10:54:51 -05:00
bors
b625812092
Auto merge of #957 - christianpoveda:ptr-align-offset, r=RalfJung
...
Fixes for align_offset
This addresses @RalfJung's comments in https://github.com/rust-lang/miri/pull/945
2019-09-28 18:38:00 +00:00
Christian Poveda
ca3a917a6f
Enable close call for macos
2019-09-25 11:16:11 -05:00
Christian Poveda
01f64616ad
Check that the only flag change is done to enable FD_CLOEXEC
2019-09-25 11:11:20 -05:00
Christian Poveda
3726081857
Add helper function to fetch libc
constants
2019-09-25 10:49:12 -05:00
Christian Poveda
79b1f91f45
First version of file handling
2019-09-25 01:17:18 -05:00
Christian Poveda
0eed5e64de
Add chdir
shim
2019-09-24 15:50:00 -05:00
Christian Poveda
02261e4be2
Fix comments
2019-09-24 09:29:16 -05:00
Christian Poveda
e2c54e64d1
Ignore integers
2019-09-22 21:39:17 -05:00
Christian Poveda
f736636038
Throw unsupported error when alignment is not a power of two
2019-09-22 20:56:48 -05:00
Christian Poveda
0f58289b3d
fetch ERANGE value from libc
2019-09-20 11:32:07 -05:00
Christian Poveda
c0a6b5ff69
Set errno when getcwd fails
2019-09-20 03:30:55 -05:00
Christian Poveda
49275d4269
Avoid writing more bytes than necessary
2019-09-20 02:13:48 -05:00
Christian Poveda
133c2b39db
Only use getcwd without isolation
2019-09-19 10:32:18 -05:00
Christian Poveda
5cf90bc786
Add getcwd shim
2019-09-18 16:13:59 -05:00
Christian Poveda
4a0b7446cf
Move truncation from the main branch
2019-09-17 13:26:12 -05:00
Christian Poveda
881929f753
Add align_offset for integers
2019-09-17 11:47:01 -05:00
Christian Poveda
55863cb88e
Use force_ptr instead of assert_ptr
2019-09-16 10:16:06 -05:00
Christian Poveda
fa20338c9a
Use str::from_utf8 instead
2019-09-12 09:36:31 -05:00
Christian Poveda
62280b4b11
Use libcore's align_offset
2019-09-11 11:09:56 -05:00
Oliver Scherer
e479ab2640
Rustup
2019-09-06 11:10:24 +02:00
Christian Poveda
4afa3bccb0
Rewrite alloc_env_var
2019-08-29 15:03:10 -05:00
Christian Poveda
814fe99516
Add cargo-miri test for no isolation
2019-08-29 10:13:02 -05:00
Christian Poveda
9c54368cca
Exclude TERM env var by default
2019-08-29 04:07:20 -05:00
Christian Poveda
c1cec3b247
Exclude env vars using flag
2019-08-28 17:57:41 -05:00
bors
283928ad55
Auto merge of #925 - christianpoveda:environ-shim, r=RalfJung
...
Write name and value for each env var
In order to res0lve https://github.com/rust-lang/miri/issues/756 is necessary to have the whole `"NAME=VALUE"` sequence of bytes written into memory instead of just the value.
This change does not affect the interface of the `shim::envs::EnvVars` type in any way.
r? @RalfJung @oli-obk
2019-08-27 15:59:32 +00:00
Christian Poveda
7d93cc7b5e
Add docs
2019-08-27 08:45:37 -05:00
Ralf Jung
3a68d943ba
rustup
2019-08-27 08:32:31 +02:00
Christian Poveda
ace3416cf2
Write name and value for each env var
2019-08-26 18:08:26 -05:00
Ralf Jung
4f1c9bb607
adjust for typed binary/unary_op
2019-08-18 07:42:15 +02:00
Ralf Jung
f9241be734
fix warning
2019-08-15 11:24:04 +02:00
Christian Poveda
aee8f173ec
Delegate writing to emulate_foreign_item
2019-08-14 16:50:36 -05:00
Christian Poveda
41f8cfa30e
Move env shims to its own module
2019-08-14 16:30:55 -05:00
bors
1f504ea7be
Auto merge of #894 - christianpoveda:env-vars-communication, r=RalfJung
...
Enable env communication
related issue: https://github.com/rust-lang/miri/issues/800 . r? @RalfJung
2019-08-14 18:58:06 +00:00
Christian Poveda
451a09a685
Remove tcx parameter for EnvVars::alloc_env_value
2019-08-14 13:54:57 -05:00