Commit Graph

163 Commits

Author SHA1 Message Date
Christian Poveda
56c5e53553 Handle host's usize correctly 2019-11-04 09:38:21 -05:00
Christian Poveda
d0b4407b25 Fix casts for count check 2019-11-03 10:04:00 -06:00
Christian Poveda
06ef77bfef Check for usize to i64 overflows 2019-10-28 16:44:18 -05:00
Christian Poveda
122549fd09 Simplify read logic 2019-10-26 09:03:45 -05:00
Christian Poveda
d7967f6b05 Drop files explicitly when closing them 2019-10-26 08:54:02 -05:00
Christian Poveda
260b463bb0 Clean file handling functions 2019-10-24 09:34:48 -05:00
Ralf Jung
c87f106cac update comments and some tweaks 2019-10-24 10:27:14 +02:00
Ralf Jung
cf9340113e rustup: more flexible write_bytes avoids allocations and removes itertools dependency 2019-10-24 10:15:30 +02:00
Christian Poveda
fb4cb5bf4a Make size error distinguishable from other errors 2019-10-22 16:57:07 -05:00
Christian Poveda
be415dbeda Use new write_bytes method 2019-10-22 11:44:49 -05:00
Ralf Jung
db949af8ed fix field index 2019-10-22 10:43:16 +02:00
Ralf Jung
2690f5948a rustup: fix for write_bytes and new union rules 2019-10-22 10:13:11 +02:00
Christian Poveda
72bd25de83 Fix merge conflicts 2019-10-21 08:49:49 -05:00
Ralf Jung
d9aa20fb31 add some missing trailing full stops that slipped through review 2019-10-21 13:24:56 +02:00
Christian Poveda
8a8fa53a5d Transform the last error place to an immediate instead 2019-10-20 07:55:26 -05:00
Christian Poveda
619ccf3834 Rename set_last_error_from_io_result 2019-10-20 07:55:25 -05:00
Christian Poveda
338e51aa48 Rename consume_result 2019-10-20 07:53:55 -05:00
Christian Poveda
ed776f67ba Change last_error to a place 2019-10-20 07:42:59 -05:00
Christian Poveda
4232939319 Move last error functions to helpers 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
Christian Poveda
85941c7249 Rename write/read os string functions 2019-10-18 09:49:56 -05:00
Christian Poveda
68fec4b3fe Use conditional compilation properly and work with OsStrs instead 2019-10-18 09:49:56 -05:00
Christian Poveda
1241abbec4 Change helper functions to read/write 2019-10-18 09:49:55 -05:00
Christian Poveda
61da8b8428 Add OsString from/to bytes helper functions 2019-10-18 09:47:19 -05: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
bors
358cfd290c Auto merge of #996 - christianpoveda:unsup-wo-isolation, r=RalfJung
Add function to error with enabled isolation

Fixes https://github.com/rust-lang/miri/issues/986
r? @RalfJung
2019-10-16 08:17:57 +00:00
bors
49cab51ac3 Auto merge of #987 - christianpoveda:check-unsupported-fs-flags, r=RalfJung
Error when there is an unsupported flag for opening a file

@RalfJung this is my attempt to check for undesired flags. I also changed fcntl to error when doing any other action besides getting the flags for a fd
2019-10-16 07:52:12 +00:00
Christian Poveda
24872230dc Check that access mode flags only use the first two bits 2019-10-15 08:01:07 -05:00
Christian Poveda
78311a7132 Add function to error with enabled isolation 2019-10-15 07:33:14 -05:00
Christian Poveda
f9c768864a Use places instead of ptrs to write packed immtys 2019-10-14 16:00:40 -05:00
Christian Poveda
50618b55cd Error on negative times 2019-10-13 16:06:37 -05:00
Christian Poveda
f76f8ce63b Correct fcntl behavior 2019-10-12 20:12:26 -05:00
Christian Poveda
d73fae1b28 Remove F_SETFD command 2019-10-11 12:20:06 -05:00
Christian Poveda
a1c6797c5c Error when there is an unsupported flag 2019-10-11 11:42:12 -05:00
Christian Poveda
2cbf4afa99 Split write_c_ints into less specific helper functions 2019-10-11 11:41:11 -05:00
Christian Poveda
87b210df6c Fix sign when number of seconds is zero 2019-10-11 11:39:32 -05:00
Christian Poveda
8f4d185d1b Move time related functions to its own module 2019-10-11 11:39:31 -05:00
Christian Poveda
9f24c12624 Add helper function to write structs 2019-10-11 11:38:22 -05:00
Christian Poveda
b7863f2509 Add gettimeofday shim for macOS 2019-10-11 11:36:33 -05:00
Christian Poveda
7a6df8504f Get size of integers using libc 2019-10-11 11:36:33 -05:00
Christian Poveda
adfa2eb062 Return negative times when the current time is before the unix epoch 2019-10-11 11:36:33 -05:00
Christian Poveda
fcf04b5425 Reduce size of nanoseconds 2019-10-11 11:36:33 -05:00
Christian Poveda
aa3e9703d1 Add clock_gettime shim 2019-10-11 11:36:33 -05: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
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