Commit Graph

1739 Commits

Author SHA1 Message Date
Ralf Jung
324fed316f print sysroot without any escaping 2019-10-19 16:38:37 +02:00
Ralf Jung
e574c77aa2 audit our bounds checks 2019-10-19 12:39:02 +02: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
Ralf Jung
2967d0d13a better error when using cargo-miri in a workspace 2019-10-16 22:03:44 +02: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
Ralf Jung
4ba63fb0fc explain our shell encoding 2019-10-15 11:03:32 +02:00
bors
42c1e779cb Auto merge of #980 - JOE1994:master, r=RalfJung
change cargo-miri.rs to fix issue #978

In Windows 10, there was an issue with building MIRI locally and getting it running,
due to unpredictable backslash escaping issues in paths.
I added a code snippet that would only be compiled in Windows OS, which replaces all backslashes in paths to slashes.
This fix should only affect Windows users.
Building and testing MIRI locally now works fine after the fix.
![miri_result_after_fix0](https://user-images.githubusercontent.com/10286488/66260998-344abc80-e794-11e9-9d7c-b4ef098443de.PNG)

Fixes https://github.com/rust-lang/miri/issues/978
2019-10-15 08:22:26 +00:00
bors
d902a11575 Auto merge of #975 - christianpoveda:clock-shim, r=RalfJung
Add clock_gettime shim

r? @oli-obk

I think there is no way to do proper testing of this other than checking that miri does not crash when calling `clock_gettime`.
2019-10-15 07:36:42 +00:00
YOUNGSUK_KIM
65fd00665e remove unnecessary line break 2019-10-14 22:37:54 -04:00
YOUNGSUK_KIM
e06ce728ca Ralf Jung's great idea! 2019-10-14 20:57:57 -04: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
508df227e5 Group libc helper functions 2019-10-12 19:48:18 -05:00
Ralf Jung
19fb53e8a3 better debugging for sysroot check 2019-10-12 18:11:44 +02: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
b8ee90d22e Throw error instead of panicking for unfittable bits 2019-10-11 11:38:24 -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
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
YOUNGSUK_KIM
610dbdd562 fixed cargo-miri bug for windows users 2019-10-10 11:03:20 -04:00
Christian Poveda
187361996f Add errno_location shim for MacOS 2019-10-08 10:22:39 -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
YOUNGSUK_KIM
2b3b865c28 change cargo-miri.rs to fix issue #978 2019-10-05 17:11:09 -04:00
Nicolas
0c4003631d
Add missing atomic_fence intrinsics as nops
Fixes #972
2019-10-05 06:12:37 -03: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