Ralf Jung
6ab82f5d35
posix_fadvise is Linux-only; also validate arguments a bit
2020-03-28 11:33:56 +01:00
Ralf Jung
9e39bfbbd9
organize shims and make some only available to libstd as they are incomplete
2020-03-28 11:15:11 +01:00
bors
f274111113
Auto merge of #1269 - RalfJung:windows-dtor, r=RalfJung
...
run Windows TLS dtor function
Mostly fixes https://github.com/rust-lang/miri/issues/442
2020-03-28 09:41:25 +00:00
Ralf Jung
876bded2e8
run Windows TLS dtor function
2020-03-28 10:39:29 +01:00
Ralf Jung
02897e03cf
cleanup tcx usage and a few comments
2020-03-28 09:50:24 +01:00
bors
f4308a0728
Auto merge of #1267 - RalfJung:macos-dtors, r=RalfJung
...
implement TLS cleanup for macOS
Now that I can run macOS interpretation locally, this was not that hard to fix. ;)
Fixes https://github.com/rust-lang/miri/issues/443
2020-03-28 07:55:42 +00:00
bors
01bc08a372
Auto merge of #1225 - JOE1994:rw_widestr, r=RalfJung
...
Add shims for env var emulation in Windows
This PR attempts to implement the final step of the instructions laid out in https://github.com/rust-lang/miri/issues/707#issuecomment-561564057 , and is yet a work in progress.
### STATUS
- [x] Add general **_target_** methods for **read_str/alloc_str** that dispatch to either **c_str** or **wide_str** variants
(**helpers.rs**)
- [x] Implement shims `fn getenvironmentvariablew`/`fn setenvironmentvariablew`
(`std::env::var()`, `std::env::set_var()`)
- [x] Implement shim `GetEnvironmentStringsW` (`std::env::vars()`)
- [x] Implement shim `FreeEnvironmentStringsW`
### ISSUES (updated on 03/21/2020)
- MIRI errors while running `std::env::remove_var()` in Windows.
MIRI complaining about raw pointer usage in
Rust standard library [*src/libstd/sys/windows/os.rs*](https://github.com/rust-lang/miri/pull/1225#issuecomment-602100146 ).
### TODO (probably on a separate PR)
- Move string helpers into a new file to avoid bloating **src/helpers.rs** too much. (**shims/os_str.rs**)
2020-03-27 19:38:41 +00:00
Ralf Jung
579b3c49da
adjust MemoryKind comment
2020-03-27 20:36:18 +01:00
Ralf Jung
c5ef8a656f
enable leak tests on macOS
2020-03-27 19:39:35 +01:00
Ralf Jung
da5f2f305b
implement TLS cleanup for macOS
2020-03-27 19:39:00 +01:00
JOE1994
ea836eeb0d
remove or update 'ignore-windows' annotations in some tests
2020-03-27 14:18:19 -04:00
Youngsuk Kim
3fe71dff5a
Modify reference to issue 1013
...
Co-Authored-By: Ralf Jung <post@ralfj.de>
2020-03-27 10:15:35 -04:00
JOE1994
eaca17fcc3
add reference to issue#1013
2020-03-27 09:59:42 -04:00
JOE1994
f3e3af4bee
adjust to change of 'fn write_os_str_to_wide_str'
2020-03-27 09:18:13 -04:00
JOE1994
4e38fbe6be
follow-up2 to review (few issues not resolved yet)
2020-03-27 08:43:50 -04:00
JOE1994
2051805e95
follow-up to reviews
2020-03-27 08:43:50 -04:00
JOE1994
cf5822af46
exclude 'TERM' env_var to avoid terminfo trying to open the termcap file
2020-03-27 08:43:08 -04:00
JOE1994
2fa07009f2
Windows shims for env var emulation
...
Shims for GetEnvironmentVariableW / SetEnvironmentVariableW /
GetEnvironmentStringsW.
Passes test 'tests/run-pass/env.rs'
2020-03-27 08:43:08 -04:00
bors
e2a9c7baed
Auto merge of #1266 - JOE1994:write_os_str_to_wide_str, r=RalfJung
...
Change helper fn 'write_os_str_to_wide_str'
Helper fn `write_os_str_to_wide_str` now works on `Scalar<Tag>`, just like other **read/write os_str** helper functions.
The 2nd commit contains some changes made to `src/shims/env.rs` in PR #1225 , in order to keep it from bloating too much.
2020-03-27 11:35:25 +00:00
Ralf Jung
07f7083409
env: more precise error
2020-03-27 12:35:08 +01:00
JOE1994
813d76d948
follow-up to reviews
2020-03-27 07:07:21 -04:00
JOE1994
160ebaa364
add OS-specific handling to src/shims/env.rs
2020-03-27 00:10:45 -04:00
JOE1994
fc8f88e04e
change helper fn 'write_os_str_to_wide_str'
2020-03-27 00:08:27 -04:00
bors
0d0a457c8b
Auto merge of #1262 - RalfJung:rustup, r=RalfJung
...
rustup; get rid of some try_from that are no longer needed
2020-03-25 23:12:38 +00:00
Ralf Jung
81d505670b
rustup; get rid of some try_from that are no longer needed
2020-03-26 00:11:50 +01:00
bors
c6e8838b89
Auto merge of #1261 - RalfJung:cross-gnu, r=RalfJung
...
cross-running windows-gnu should now also work
Fixes https://github.com/rust-lang/miri/issues/1198
2020-03-25 11:11:41 +00:00
Ralf Jung
8ffbca797f
bump xargo version
2020-03-25 12:11:05 +01:00
Ralf Jung
e19552ba41
cross-running windows-gnu should now also work
2020-03-25 11:44:11 +01:00
bors
a84d8a8b98
Auto merge of #1260 - RalfJung:unreachable, r=RalfJung
...
Implement unreachable intrinsic
Fixes https://github.com/rust-lang/miri/issues/1254
2020-03-25 08:33:44 +00:00
Ralf Jung
962e2105df
remove an unnecessary as_str
2020-03-25 09:32:15 +01:00
Ralf Jung
47b91e619a
test unreachable intrinsic
2020-03-25 09:32:15 +01:00
bors
5d8229e4f4
Auto merge of #1259 - RalfJung:rustup, r=RalfJung
...
rustup, adjust for renames
2020-03-25 08:10:28 +00:00
Ralf Jung
9b0e9dec49
rustup, adjust for renames
2020-03-25 09:05:30 +01:00
bors
a6d74a6026
Auto merge of #1251 - RalfJung:win-cross, r=RalfJung
...
cross-test on a Windows host
2020-03-24 13:18:44 +00:00
Ralf Jung
e9e04e56fc
move path methods together, to the bottom of the string helpers
2020-03-24 09:11:48 +01:00
Ralf Jung
8817397828
test harness informs tests about suitable temp dir
2020-03-24 09:11:48 +01:00
Ralf Jung
3ba588db49
make fs.rs at least build under Windows
2020-03-24 09:11:48 +01:00
Ralf Jung
c4e29c8646
convert dir separators on path load/store
2020-03-24 09:11:48 +01:00
Ralf Jung
4ac91384ff
route all path reading/writing through central read/write methods
2020-03-24 09:11:47 +01:00
Ralf Jung
3517ce66ab
need to unset MIRI_SYSROOT before calling 'cargo miri setup'
2020-03-24 09:11:47 +01:00
Ralf Jung
da721233d7
cross-test on a Windows host
2020-03-24 09:11:47 +01:00
bors
ad7089f194
Auto merge of #1258 - RalfJung:rustup, r=RalfJung
...
Rustup
2020-03-24 07:29:25 +00:00
Ralf Jung
87f5495715
32bit macOS is no more
2020-03-24 08:25:37 +01:00
Ralf Jung
80088e131b
rustup for trait MachineStopType
2020-03-24 08:24:36 +01:00
bors
15dd15861c
Auto merge of #1256 - JOE1994:rw_widestr_helpers, r=RalfJung
...
helper functions for env_var emulation in Windows
Moving some of the changes submitted in PR #1225 , in order to prevent the original PR from bloating too much.
2020-03-24 07:09:40 +00:00
JOE1994
5f9167bdaa
helper functions for env_var emulation in Windows
2020-03-23 19:40:22 -04:00
bors
e5f1a29937
Auto merge of #1257 - RalfJung:rustup, r=RalfJung
...
Rustup
2020-03-23 22:55:08 +00:00
Ralf Jung
9091811147
use Wake trait for async-fn driver
2020-03-23 23:53:54 +01:00
Ralf Jung
284067cc15
rustup
2020-03-23 23:48:24 +01:00
bors
db49339136
Auto merge of #1255 - RalfJung:os_str_bytes, r=RalfJung
...
fix conditional compilation condition for os_str <-> bytes conversion
Turns out that condition was wrong and these functions never got compiled... Cc @christianpoveda
2020-03-23 18:45:34 +00:00