Commit Graph

3271 Commits

Author SHA1 Message Date
Christian Poveda
aa3e9703d1 Add clock_gettime shim 2019-10-11 11:36:33 -05:00
bors
6a2776e465 Auto merge of #983 - christianpoveda:fs-shims-tweaks, r=RalfJung
Various fixes to the file related shims

Hi @RalfJung, I'll be working incrementally over your comments for the new `fs` shims module here.
2019-10-11 13:37:05 +00:00
Christian Poveda
003b257f87 Change error handling style for consistency 2019-10-11 08:20:32 -05:00
Christian Poveda
60cf06a03f Use existing tcx instead 2019-10-11 04:20:18 -05:00
Christian Poveda
67ea454647 Correct style of comments 2019-10-11 04:17:43 -05:00
bors
e10d9d32d7 Auto merge of #985 - christianpoveda:fix-fs-path, r=RalfJung
Avoid using the tests folder for the file manipualtion test

https://github.com/rust-lang/rust/pull/65278 r? @RalfJung
2019-10-11 09:03:11 +00:00
Christian Poveda
e9138ab4d6 Rename file manipulation test to fs 2019-10-11 04:01:07 -05:00
Christian Poveda
ae9f4e1e63 Avoid using the tests folder for the file manipualtion test 2019-10-11 04:00:12 -05:00
Christian Poveda
1c64f29811 Add comment for the flag diff check 2019-10-11 03:55:18 -05:00
Christian Poveda
12040aae88 Add comment explaining why buffer isn't overflowed 2019-10-11 03:43:20 -05:00
Christian Poveda
8368d4f2b4 Add comments to explain the chdir test 2019-10-11 02:35:50 -05:00
Christian Poveda
c8df0171e8 Move functions to eval libc constants to helpers 2019-10-11 01:53:31 -05:00
Christian Poveda
976c976f09 Rename shims::io to shims::fs 2019-10-11 01:49:28 -05:00
bors
3899dce3b6 Auto merge of #982 - RalfJung:rustup, r=RalfJung
bump to latest nightly

Just because it has been a while since the last bump.
2019-10-09 11:01:53 +00:00
Ralf Jung
c2e4c877c5 bump to latest nightly 2019-10-09 11:11:56 +02:00
bors
d57de39141 Auto merge of #981 - RalfJung:atomic, r=RalfJung
also test AcqRel fence

Missing from https://github.com/rust-lang/miri/pull/979
2019-10-09 08:32:58 +00:00
Ralf Jung
62f08eb416 also test AcqRel fence 2019-10-09 10:29:08 +02:00
bors
cc0468b4bc Auto merge of #976 - christianpoveda:unlink-shim, r=oli-obk
Add unlink shim to delete files

r? @oli-obk
This closes the whole create, write, read, delete circle for file handling.
2019-10-08 16:14:41 +00:00
Christian Poveda
187361996f Add errno_location shim for MacOS 2019-10-08 10:22:39 -05:00
Christian Poveda
00792493ef Add tests for non-existing files 2019-10-08 08:57:30 -05:00
Christian Poveda
ffc47de1b9 Add unlink shim to delete files 2019-10-08 08:50:58 -05:00
bors
9d03dd6364 Auto merge of #977 - christianpoveda:last-error-ptr, r=oli-obk
Move last error into memory

These changes move the `Evaluator::last_error` into miri's memory and implement the `__errno_location()` shim (which is used by the file handling functions when they fail).
2019-10-08 13:21:05 +00:00
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
bors
de4a846027 Auto merge of #979 - nico-abram:patch-1, r=oli-obk
Add missing atomic_fence intrinsics as nops

Fixes #972
2019-10-05 15:23:35 +00:00
Nicolas
bd4a2996d1 Add test for atomic fences 2019-10-05 08:20:17 -03:00
Nicolas
0c4003631d
Add missing atomic_fence intrinsics as nops
Fixes #972
2019-10-05 06:12:37 -03:00
bors
b0de1e9b95 Auto merge of #973 - christianpoveda:write-shim, r=oli-obk
Enable file writing

r? @oli-obk
2019-10-02 14:16:43 +00: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
bors
1037f69bf6 Auto merge of #962 - christianpoveda:file-shim, r=oli-obk
Add shims for file handling

This adds the bare minimum to be able to do `File::open` and `File::read`. I also need some feedback about how to handle certain things
2019-10-01 15:33:09 +00: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
07ac10277e Auto merge of #971 - RalfJung:rustup, r=RalfJung
bump rust even more

Internet in this train isn't good enough to test this... so let's see. ;)
2019-09-29 17:15:19 +00:00
Ralf Jung
241b418125 bump rust even more 2019-09-29 12:31:04 -04:00
bors
57cc8ce1d7 Auto merge of #970 - RalfJung:align_offset, r=RalfJung
more align_offset tests

Cc @christianpoveda
2019-09-29 16:26:36 +00:00
Ralf Jung
a9c207dce2 fix tests on 32bit 2019-09-29 12:26:13 -04:00
Ralf Jung
b5d449949a comments and another test 2019-09-29 11:49:04 -04:00
Ralf Jung
9650b7868e more align_offset tests 2019-09-29 11:43:50 -04:00
bors
ea3eee0544 Auto merge of #969 - RalfJung:rustup, r=RalfJung
fix test failure from diagnostics change

@oli-obk looks like with some recent change, the error about the shift now needs `const_err` instead of `exceeding_bitshifts` to be silenced?
2019-09-29 15:31:59 +00:00