]> git.lizzy.rs Git - rust.git/log
rust.git
4 years agoprefer float assoc consts over std module
Ralf Jung [Tue, 7 Apr 2020 14:13:19 +0000 (16:13 +0200)]
prefer float assoc consts over std module

4 years agoAuto merge of #1307 - RalfJung:vec-extend, r=RalfJung
bors [Sun, 5 Apr 2020 17:14:49 +0000 (17:14 +0000)]
Auto merge of #1307 - RalfJung:vec-extend, r=RalfJung

also test push_str ptr stability (the original report)

4 years agoalso test push_str ptr stability (the original report)
Ralf Jung [Sun, 5 Apr 2020 17:13:36 +0000 (19:13 +0200)]
also test push_str ptr stability (the original report)

4 years agoAuto merge of #1253 - RalfJung:vec-extend, r=RalfJung
bors [Sun, 5 Apr 2020 16:28:41 +0000 (16:28 +0000)]
Auto merge of #1253 - RalfJung:vec-extend, r=RalfJung

test Vec::extend

Currently fails, until https://github.com/rust-lang/rust/issues/70301 gets fixed.

4 years agorustup
Ralf Jung [Sun, 5 Apr 2020 16:28:05 +0000 (18:28 +0200)]
rustup

4 years agofor consistency also rename floats.rs
Ralf Jung [Mon, 30 Mar 2020 11:39:04 +0000 (13:39 +0200)]
for consistency also rename floats.rs

4 years agouse mutable reference
Ralf Jung [Mon, 30 Mar 2020 11:27:59 +0000 (13:27 +0200)]
use mutable reference

4 years agotest some more vec ptr invalidation
Ralf Jung [Mon, 30 Mar 2020 08:41:44 +0000 (10:41 +0200)]
test some more vec ptr invalidation

4 years agotest Vec::extend
Ralf Jung [Mon, 23 Mar 2020 12:02:02 +0000 (13:02 +0100)]
test Vec::extend

4 years agoAuto merge of #1305 - ssomers:map_first_last_vs_miri, r=RalfJung
bors [Sun, 5 Apr 2020 15:47:28 +0000 (15:47 +0000)]
Auto merge of #1305 - ssomers:map_first_last_vs_miri, r=RalfJung

Replace last_entry with last_key_value

Wondering why `last_entry` was introduced (in #1156) while the alternative is shorter and seems clearer to me.

Also, as the perpetrator of map_first_last, I now think that `first_entry`/`last_entry` are silly methods because they're supposed to be constant time (as opposed to `entry`), so there's no money to be made by doing multiple things with the entry.

4 years agoReplace last_entry with last_key_value
Stein Somers [Sun, 5 Apr 2020 13:21:15 +0000 (15:21 +0200)]
Replace last_entry with last_key_value

4 years agoAuto merge of #1303 - RalfJung:readme, r=RalfJung
bors [Sun, 5 Apr 2020 06:35:55 +0000 (06:35 +0000)]
Auto merge of #1303 - RalfJung:readme, r=RalfJung

tweak README

Cc @Firstyear

I realized the README has an example of unsupported code, so I changed the error to match that example.

4 years agotweak README
Ralf Jung [Sat, 4 Apr 2020 17:35:46 +0000 (19:35 +0200)]
tweak README

4 years agoAuto merge of #1293 - Firstyear:1289-miri-readme, r=RalfJung
bors [Sat, 4 Apr 2020 16:27:16 +0000 (16:27 +0000)]
Auto merge of #1293 - Firstyear:1289-miri-readme, r=RalfJung

Update readme to make supported code clearer

Fixes https://github.com/rust-lang/miri/issues/1289

This makes it clearer in the readme how miri will warn of supported or unsupported code in a program under test/run.

Thanks!

4 years agoAuto merge of #1300 - RalfJung:rust-src, r=RalfJung
bors [Sat, 4 Apr 2020 14:46:40 +0000 (14:46 +0000)]
Auto merge of #1300 - RalfJung:rust-src, r=RalfJung

Rust bootstrap sysroot now has src in the same place as rust-src

So we can remove a special hack. I checked this locally to confirm it works.

Cc https://github.com/rust-lang/rust/pull/70642 @eddyb

4 years agoRust bootstrap sysroot now has src in the same place as rust-src, so remove special...
Ralf Jung [Sat, 4 Apr 2020 10:07:22 +0000 (12:07 +0200)]
Rust bootstrap sysroot now has src in the same place as rust-src, so remove special hack

4 years agoAuto merge of #1294 - JOE1994:windows_instant, r=RalfJung
bors [Fri, 3 Apr 2020 06:36:15 +0000 (06:36 +0000)]
Auto merge of #1294 - JOE1994:windows_instant, r=RalfJung

Add support for 'std::time::Instant' in Windows

Add support for creating `std::time::Instant` in Windows

Includes shims for `QueryPerformanceCounter` & `QueryPerformanceFrequency` in Windows, which are both called in Windows when `std::time::Instant` is created.

Windows docs page ["Acquiring high-resolution time stamps"](https://docs.microsoft.com/en-us/windows/win32/sysinfo/acquiring-high-resolution-time-stamps) was helpful in learning how `QueryPerformanceCounter` & `QueryPerformanceFrequency` work.

closes #1291

4 years agoApply feedback
William Brown [Thu, 2 Apr 2020 23:07:57 +0000 (09:07 +1000)]
Apply feedback

4 years agoAuto merge of #1299 - RalfJung:rustup, r=RalfJung
bors [Thu, 2 Apr 2020 22:07:15 +0000 (22:07 +0000)]
Auto merge of #1299 - RalfJung:rustup, r=RalfJung

rustup for import changes

4 years agorustup for import changes
Ralf Jung [Thu, 2 Apr 2020 22:05:35 +0000 (00:05 +0200)]
rustup for import changes

4 years agochange cfg gate to enable testing Instant subtraction in Windows
JOE1994 [Thu, 2 Apr 2020 20:15:23 +0000 (16:15 -0400)]
change cfg gate to enable testing Instant subtraction in Windows

4 years agoUpdate comments in src/shims/time.rs
Youngsuk Kim [Thu, 2 Apr 2020 20:04:50 +0000 (16:04 -0400)]
Update comments in src/shims/time.rs

Co-Authored-By: Ralf Jung <post@ralfj.de>
4 years agoUpdate comments in src/shims/time.rs
Youngsuk Kim [Thu, 2 Apr 2020 20:04:10 +0000 (16:04 -0400)]
Update comments in src/shims/time.rs

Co-Authored-By: Ralf Jung <post@ralfj.de>
4 years agoUpdate comments in src/shims/time.rs
Youngsuk Kim [Thu, 2 Apr 2020 20:03:56 +0000 (16:03 -0400)]
Update comments in src/shims/time.rs

Co-Authored-By: Ralf Jung <post@ralfj.de>
4 years agoAuto merge of #1297 - RalfJung:win-ticks, r=RalfJung
bors [Thu, 2 Apr 2020 14:13:08 +0000 (14:13 +0000)]
Auto merge of #1297 - RalfJung:win-ticks, r=RalfJung

correct factual mistake in Windows message

Also use `+` instead of `checked_add().unwrap()` (which is equivalent).

Cc @JOE1994

4 years agocorrect factual mistake in Windows message, and use "+" sugar
Ralf Jung [Thu, 2 Apr 2020 13:14:53 +0000 (15:14 +0200)]
correct factual mistake in Windows message, and use "+" sugar

4 years agoAuto merge of #1296 - RalfJung:rustup, r=RalfJung
bors [Thu, 2 Apr 2020 11:34:49 +0000 (11:34 +0000)]
Auto merge of #1296 - RalfJung:rustup, r=RalfJung

rustup for AllocRef changes

Cc https://github.com/rust-lang/rust/pull/70362

4 years agoport compile-fail allocator tests to stable API
Ralf Jung [Thu, 2 Apr 2020 11:33:59 +0000 (13:33 +0200)]
port compile-fail allocator tests to stable API

4 years agorustup for AllocRef changes
Ralf Jung [Thu, 2 Apr 2020 09:45:17 +0000 (11:45 +0200)]
rustup for AllocRef changes

4 years agoAuto merge of #1295 - RalfJung:ci-no-incremental, r=RalfJung
bors [Thu, 2 Apr 2020 07:54:50 +0000 (07:54 +0000)]
Auto merge of #1295 - RalfJung:ci-no-incremental, r=RalfJung

set CARGO_INCREMENTAL=0 on CI

it's just a waste of time there

4 years agoset CARGO_INCREMENTAL=0 on CI, it's just a waste of time there
Ralf Jung [Thu, 2 Apr 2020 07:49:48 +0000 (09:49 +0200)]
set CARGO_INCREMENTAL=0 on CI, it's just a waste of time there

4 years agoAuto merge of #1283 - RalfJung:backtrace, r=RalfJung
bors [Thu, 2 Apr 2020 07:32:44 +0000 (07:32 +0000)]
Auto merge of #1283 - RalfJung:backtrace, r=RalfJung

Make backtrace function names and spans match up

This is the Miri side of https://github.com/rust-lang/rust/pull/70590.
Fixes https://github.com/rust-lang/miri/issues/521

4 years agofix for FieldPlacement rename
Ralf Jung [Thu, 2 Apr 2020 07:19:56 +0000 (09:19 +0200)]
fix for FieldPlacement rename

4 years agorustup
Ralf Jung [Thu, 2 Apr 2020 07:14:23 +0000 (09:14 +0200)]
rustup

4 years agoadjust for span not being passed around any more
Ralf Jung [Mon, 30 Mar 2020 20:54:49 +0000 (22:54 +0200)]
adjust for span not being passed around any more

4 years agoadjust stacktrace printing to rustc changes
Ralf Jung [Mon, 30 Mar 2020 18:15:02 +0000 (20:15 +0200)]
adjust stacktrace printing to rustc changes

4 years agofix incorrect error message in shim 'QueryPerformanceCounter'
JOE1994 [Thu, 2 Apr 2020 01:26:47 +0000 (21:26 -0400)]
fix incorrect error message in shim 'QueryPerformanceCounter'

4 years agoAdd support for 'std::time::Instant' in Windows
JOE1994 [Thu, 2 Apr 2020 00:35:56 +0000 (20:35 -0400)]
Add support for 'std::time::Instant' in Windows

4 years agoUpdate readme to make supported codo clearer
William Brown [Wed, 1 Apr 2020 23:50:21 +0000 (09:50 +1000)]
Update readme to make supported codo clearer

4 years agoAuto merge of #1292 - RalfJung:time, r=RalfJung
bors [Wed, 1 Apr 2020 18:34:59 +0000 (18:34 +0000)]
Auto merge of #1292 - RalfJung:time, r=RalfJung

sanity check time values a bit more

4 years agosanity check time values a bit more
Ralf Jung [Wed, 1 Apr 2020 18:12:51 +0000 (20:12 +0200)]
sanity check time values a bit more

4 years agoAuto merge of #1290 - RalfJung:rustup, r=RalfJung
bors [Wed, 1 Apr 2020 17:59:33 +0000 (17:59 +0000)]
Auto merge of #1290 - RalfJung:rustup, r=RalfJung

Rustup

Also remove ICEing `breakpoint` intrinsic shim.

4 years agorustup
Ralf Jung [Wed, 1 Apr 2020 17:40:10 +0000 (19:40 +0200)]
rustup

4 years agoAuto merge of #1286 - JOE1994:windows_time, r=RalfJung
bors [Wed, 1 Apr 2020 17:36:04 +0000 (17:36 +0000)]
Auto merge of #1286 - JOE1994:windows_time, r=RalfJung

Implement 'GetSystemTimeAsFileTime' shim for Windows

Implement `GetSystemTimeAsFileTime` shim for Windows.

Closes #997

4 years agoremove ICEin intrinsic
Ralf Jung [Wed, 1 Apr 2020 17:12:22 +0000 (19:12 +0200)]
remove ICEin intrinsic

4 years agoImplement 'GetSystemTimeAsFileTime' shim for Windows
JOE1994 [Tue, 31 Mar 2020 15:26:32 +0000 (11:26 -0400)]
Implement 'GetSystemTimeAsFileTime' shim for Windows

4 years agoAuto merge of #1287 - RalfJung:time-sub, r=RalfJung
bors [Tue, 31 Mar 2020 15:53:44 +0000 (15:53 +0000)]
Auto merge of #1287 - RalfJung:time-sub, r=RalfJung

test subtracting SystemTime and Instant

4 years agoadd TODO
Ralf Jung [Tue, 31 Mar 2020 15:53:27 +0000 (17:53 +0200)]
add TODO

4 years agotest subtracting SystemTime and Instant
Ralf Jung [Tue, 31 Mar 2020 15:50:10 +0000 (17:50 +0200)]
test subtracting SystemTime and Instant

4 years agoAuto merge of #1282 - RalfJung:rustup, r=RalfJung
bors [Mon, 30 Mar 2020 20:14:50 +0000 (20:14 +0000)]
Auto merge of #1282 - RalfJung:rustup, r=RalfJung

rustup; fix Windows env var memory type

4 years agorustup; fix Windows env var memory type
Ralf Jung [Mon, 30 Mar 2020 20:13:53 +0000 (22:13 +0200)]
rustup; fix Windows env var memory type

4 years agoAuto merge of #1270 - RalfJung:incremental, r=RalfJung
bors [Mon, 30 Mar 2020 17:56:33 +0000 (17:56 +0000)]
Auto merge of #1270 - RalfJung:incremental, r=RalfJung

miri build script: use incremental builds

I somehow thought that was already the default, but seems like it is not?

4 years agoAuto merge of #1279 - divergentdave:open_O_EXCL, r=RalfJung
bors [Mon, 30 Mar 2020 15:49:45 +0000 (15:49 +0000)]
Auto merge of #1279 - divergentdave:open_O_EXCL, r=RalfJung

Add support for OpenOptions::create_new()/O_EXCL

This PR extends the POSIX shim for `open` to support the `O_EXCL` flag, when it is used alongside `O_CREAT`, and exercises it by testing `OpenOptions::create_new`.

4 years agoAuto merge of #1281 - RalfJung:rustup, r=RalfJung
bors [Mon, 30 Mar 2020 09:09:20 +0000 (09:09 +0000)]
Auto merge of #1281 - RalfJung:rustup, r=RalfJung

adjust for librustc rename; reduce 'extern crate' to rustc crates

4 years agoadjust for librustc rename; reduce 'extern crate' to rustc crates
Ralf Jung [Mon, 30 Mar 2020 09:07:32 +0000 (11:07 +0200)]
adjust for librustc rename; reduce 'extern crate' to rustc crates

4 years agoAuto merge of #1280 - RalfJung:rustup, r=RalfJung
bors [Mon, 30 Mar 2020 08:24:40 +0000 (08:24 +0000)]
Auto merge of #1280 - RalfJung:rustup, r=RalfJung

rustup; fix for TyLayout rename

4 years agotest const-generic Vec::from(array)
Ralf Jung [Mon, 30 Mar 2020 08:23:16 +0000 (10:23 +0200)]
test const-generic Vec::from(array)

4 years agorustup; fix for TyLayout rename
Ralf Jung [Mon, 30 Mar 2020 08:23:04 +0000 (10:23 +0200)]
rustup; fix for TyLayout rename

4 years agoAuto merge of #1278 - JOE1994:cow, r=RalfJung
bors [Sun, 29 Mar 2020 22:43:36 +0000 (22:43 +0000)]
Auto merge of #1278 - JOE1994:cow, r=RalfJung

make 'fn convert_path_separator' to take 'Cow<>' as argument

Fixed `fn convert_path_separator()` to take `Cow<>` as argument,
in order to prevent unnecessary allocation when target & host path separators are equal.

4 years agoAdd support for OpenOptions::create_new()/O_EXCL
David Cook [Sun, 29 Mar 2020 21:03:05 +0000 (16:03 -0500)]
Add support for OpenOptions::create_new()/O_EXCL

4 years agofix fn read_path_from_wide_str
JOE1994 [Sun, 29 Mar 2020 20:01:07 +0000 (16:01 -0400)]
fix fn read_path_from_wide_str

4 years agomake 'fn convert_path_separator' to take Cow<> (to remove unnecessary allocation)
JOE1994 [Sun, 29 Mar 2020 18:19:59 +0000 (14:19 -0400)]
make 'fn convert_path_separator' to take Cow<> (to remove unnecessary allocation)

4 years agoAuto merge of #1268 - JOE1994:dir, r=RalfJung
bors [Sun, 29 Mar 2020 17:19:57 +0000 (17:19 +0000)]
Auto merge of #1268 - JOE1994:dir, r=RalfJung

Windows shims for GetCurrentDirectoryW/SetCurrentDirectoryW

Implemented shims for Windows
* [GetCurrentDirectoryW](https://github.com/rust-lang/rust/blob/75208942f6144daac669e8e382029fc33bdce841/src/libstd/sys/windows/os.rs#L242) (`getcwd` for Windows)
* [SetCurrentDirectoryW](https://github.com/rust-lang/rust/blob/75208942f6144daac669e8e382029fc33bdce841/src/libstd/sys/windows/os.rs#L250) (`chdir` for Windows)

Currently passes test :
`./miri run tests/run-pass/current_dir.rs -Zmiri-disable-isolation`

4 years agoMove definition of 'fn windows_check_buffer_size' to top of 'src/shims/env.rs'
JOE1994 [Sun, 29 Mar 2020 17:13:42 +0000 (13:13 -0400)]
Move definition of 'fn windows_check_buffer_size' to top of 'src/shims/env.rs'

4 years agosmall refactorings to 'src/shims/os_str.rs' & 'src/shims/env.rs'
JOE1994 [Sun, 29 Mar 2020 17:10:23 +0000 (13:10 -0400)]
small refactorings to 'src/shims/os_str.rs' & 'src/shims/env.rs'

4 years agofix fn GetCurrentDirectoryW + clarify return types of Windows shims
JOE1994 [Sun, 29 Mar 2020 15:15:53 +0000 (11:15 -0400)]
fix fn GetCurrentDirectoryW + clarify return types of Windows shims

4 years agofix 'magic boolean' to enum
JOE1994 [Sun, 29 Mar 2020 14:21:02 +0000 (10:21 -0400)]
fix 'magic boolean' to enum

4 years agoFollow-up to reviews from RalfJung
JOE1994 [Sun, 29 Mar 2020 13:46:13 +0000 (09:46 -0400)]
Follow-up to reviews from RalfJung
1. Fix 'fn convert_path_separator' in src/shims/os_str.rs
2. Fix 'fn set_last_error_from_io_error' in src/helpers.rs
3. Minor comment fix for 'fn SetCurrentDirectoryW' in src/shims/env.rs

4 years agoWindows shims for GetCurrentDirectoryW/SetCurrentDirectoryW
JOE1994 [Sat, 28 Mar 2020 18:44:41 +0000 (14:44 -0400)]
Windows shims for GetCurrentDirectoryW/SetCurrentDirectoryW

4 years agopartially implement 'set_last_error_from_io_error' for Windows
JOE1994 [Sat, 28 Mar 2020 18:42:22 +0000 (14:42 -0400)]
partially implement 'set_last_error_from_io_error' for Windows

4 years agoAuto merge of #1277 - RalfJung:rustup, r=RalfJung
bors [Sun, 29 Mar 2020 08:02:10 +0000 (08:02 +0000)]
Auto merge of #1277 - RalfJung:rustup, r=RalfJung

rustup

Fix for some renames

4 years agorustup
Ralf Jung [Sun, 29 Mar 2020 08:01:31 +0000 (10:01 +0200)]
rustup

4 years agoAuto merge of #1276 - RalfJung:scalar-precise-sizes, r=RalfJung
bors [Sat, 28 Mar 2020 18:16:13 +0000 (18:16 +0000)]
Auto merge of #1276 - RalfJung:scalar-precise-sizes, r=RalfJung

Construct Scalar with precise sizes

4 years agoprecise getrandom return type and align_offset arithmetic
Ralf Jung [Sat, 28 Mar 2020 16:47:00 +0000 (17:47 +0100)]
precise getrandom return type and align_offset arithmetic

4 years agouse ptr_null where appropriate
Ralf Jung [Sat, 28 Mar 2020 16:38:38 +0000 (17:38 +0100)]
use ptr_null where appropriate

4 years agoavoid Scalar::from_(u)int in favor of giving the size explicitly
Ralf Jung [Sat, 28 Mar 2020 16:35:40 +0000 (17:35 +0100)]
avoid Scalar::from_(u)int in favor of giving the size explicitly

4 years agoAuto merge of #1275 - JOE1994:move_string_helpers, r=RalfJung
bors [Sat, 28 Mar 2020 15:32:16 +0000 (15:32 +0000)]
Auto merge of #1275 - JOE1994:move_string_helpers, r=RalfJung

move OsStr helpers to a separate file

Moved OsStr read/write functions from `src/helpers.rs` to `src/shims/os_str.rs`, in order to keep `src/helpers.rs` from bloating too much.

4 years agovisually separate conditional imports in 'os_str.rs'
JOE1994 [Sat, 28 Mar 2020 15:20:16 +0000 (11:20 -0400)]
visually separate conditional imports in 'os_str.rs'

4 years agoAuto merge of #1274 - RalfJung:float-cast, r=RalfJung
bors [Sat, 28 Mar 2020 14:47:42 +0000 (14:47 +0000)]
Auto merge of #1274 - RalfJung:float-cast, r=RalfJung

fix float test comments and test a few more int->float casts

4 years agofix float test comments and test a few more int->float casts
Ralf Jung [Sat, 28 Mar 2020 14:45:45 +0000 (15:45 +0100)]
fix float test comments and test a few more int->float casts

4 years agomove OsStr helpers to a separate file
JOE1994 [Sat, 28 Mar 2020 14:43:47 +0000 (10:43 -0400)]
move OsStr helpers to a separate file

4 years agoAuto merge of #1265 - RalfJung:float-cast, r=RalfJung
bors [Sat, 28 Mar 2020 14:19:29 +0000 (14:19 +0000)]
Auto merge of #1265 - RalfJung:float-cast, r=RalfJung

test floating point casting better

4 years agoAuto merge of #1273 - RalfJung:environ-cleanup, r=RalfJung
bors [Sat, 28 Mar 2020 13:33:57 +0000 (13:33 +0000)]
Auto merge of #1273 - RalfJung:environ-cleanup, r=RalfJung

we don't deallocate the environ global, so leave it in the machine

Follow-up to https://github.com/rust-lang/miri/pull/1271. I forgot to adjust this when my plans changed a bit.

4 years agowe don't deallocate the environ global, so leave it in the machine
Ralf Jung [Sat, 28 Mar 2020 13:32:50 +0000 (14:32 +0100)]
we don't deallocate the environ global, so leave it in the machine

4 years agoAuto merge of #1263 - RalfJung:shims-limit, r=RalfJung
bors [Sat, 28 Mar 2020 10:35:11 +0000 (10:35 +0000)]
Auto merge of #1263 - RalfJung:shims-limit, r=RalfJung

Limit shims to libstd where possible

Also organize them better by category.
Fixes https://github.com/rust-lang/miri/issues/1181 (by making mmap not callable from user code)

4 years agoposix_fadvise is Linux-only; also validate arguments a bit
Ralf Jung [Sat, 28 Mar 2020 10:33:56 +0000 (11:33 +0100)]
posix_fadvise is Linux-only; also validate arguments a bit

4 years agoorganize shims and make some only available to libstd as they are incomplete
Ralf Jung [Thu, 26 Mar 2020 10:41:31 +0000 (11:41 +0100)]
organize shims and make some only available to libstd as they are incomplete

4 years agoAuto merge of #1271 - RalfJung:env-clean, r=RalfJung
bors [Sat, 28 Mar 2020 10:09:11 +0000 (10:09 +0000)]
Auto merge of #1271 - RalfJung:env-clean, r=RalfJung

env shim: make sure we clean up all the memory we allocate

`Machine` memory is not leak-checked, so if we forgot to deallocate part of the env shim memory, we wouldn't even notice. Thus add a dedicated memory kind that is leak-checked.

4 years agoenv shim: make sure we clean up all the memory we allocate
Ralf Jung [Sat, 28 Mar 2020 10:06:56 +0000 (11:06 +0100)]
env shim: make sure we clean up all the memory we allocate

4 years agoAuto merge of #1269 - RalfJung:windows-dtor, r=RalfJung
bors [Sat, 28 Mar 2020 09:41:25 +0000 (09:41 +0000)]
Auto merge of #1269 - RalfJung:windows-dtor, r=RalfJung

run Windows TLS dtor function

Mostly fixes https://github.com/rust-lang/miri/issues/442

4 years agorun Windows TLS dtor function
Ralf Jung [Sat, 28 Mar 2020 09:07:23 +0000 (10:07 +0100)]
run Windows TLS dtor function

4 years agomiri build script: use incremental builds
Ralf Jung [Sat, 28 Mar 2020 09:29:05 +0000 (10:29 +0100)]
miri build script: use incremental builds

4 years agocleanup tcx usage and a few comments
Ralf Jung [Sat, 28 Mar 2020 08:50:24 +0000 (09:50 +0100)]
cleanup tcx usage and a few comments

4 years agoavoid promotion so this can be compared with rustc
Ralf Jung [Sat, 28 Mar 2020 08:20:07 +0000 (09:20 +0100)]
avoid promotion so this can be compared with rustc

4 years agoalso do some float-to-float cast testing
Ralf Jung [Sat, 28 Mar 2020 08:10:34 +0000 (09:10 +0100)]
also do some float-to-float cast testing

4 years agoAuto merge of #1267 - RalfJung:macos-dtors, r=RalfJung
bors [Sat, 28 Mar 2020 07:55:42 +0000 (07:55 +0000)]
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

4 years agoAuto merge of #1225 - JOE1994:rw_widestr, r=RalfJung
bors [Fri, 27 Mar 2020 19:38:41 +0000 (19:38 +0000)]
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**)

4 years agoadjust MemoryKind comment
Ralf Jung [Fri, 27 Mar 2020 19:36:18 +0000 (20:36 +0100)]
adjust MemoryKind comment

4 years agoenable leak tests on macOS
Ralf Jung [Fri, 27 Mar 2020 18:39:35 +0000 (19:39 +0100)]
enable leak tests on macOS

4 years agoimplement TLS cleanup for macOS
Ralf Jung [Fri, 27 Mar 2020 18:39:00 +0000 (19:39 +0100)]
implement TLS cleanup for macOS