]> git.lizzy.rs Git - rust.git/log
rust.git
4 years agointroduce platform-specific module hierarchy for dlsym (similar to foreign_items)
Ralf Jung [Sat, 27 Jun 2020 11:50:52 +0000 (13:50 +0200)]
introduce platform-specific module hierarchy for dlsym (similar to foreign_items)

4 years agoAuto merge of #1460 - RalfJung:modules, r=RalfJung
bors [Sat, 27 Jun 2020 11:27:36 +0000 (11:27 +0000)]
Auto merge of #1460 - RalfJung:modules, r=RalfJung

Re-organize platform-specific shims

Move platform-specific code to `shims::{posix::{linux, macos}, windows}`. Also make it private in these modules to ensure we are reasonably structured.

4 years agomodule organization: move platform-specific code to shims::{posix::{linux, macos...
Ralf Jung [Sat, 27 Jun 2020 11:19:35 +0000 (13:19 +0200)]
module organization: move platform-specific code to shims::{posix::{linux, macos}, windows}

4 years agoRename shims::{sync -> posic_sync} and move sync_singlethread test to other sync...
Ralf Jung [Sat, 27 Jun 2020 10:36:20 +0000 (12:36 +0200)]
Rename shims::{sync -> posic_sync} and move sync_singlethread test to other sync test

4 years agoAuto merge of #1459 - RalfJung:ptr_guaranteed_eq, r=RalfJung
bors [Sat, 27 Jun 2020 10:15:01 +0000 (10:15 +0000)]
Auto merge of #1459 - RalfJung:ptr_guaranteed_eq, r=RalfJung

supply our own implementation of the CTFE pointer comparison intrinsics

4 years agosupply our own implementation of the CTFE pointer comparison intrinsics
Ralf Jung [Sat, 27 Jun 2020 09:57:43 +0000 (11:57 +0200)]
supply our own implementation of the CTFE pointer comparison intrinsics

4 years agoAuto merge of #1458 - RalfJung:rustup, r=RalfJung
bors [Fri, 26 Jun 2020 18:36:58 +0000 (18:36 +0000)]
Auto merge of #1458 - RalfJung:rustup, r=RalfJung

bump Rust

4 years agobump Rust
Ralf Jung [Fri, 26 Jun 2020 18:36:08 +0000 (20:36 +0200)]
bump Rust

4 years agoAuto merge of #1457 - RalfJung:rustup, r=RalfJung
bors [Thu, 25 Jun 2020 09:43:51 +0000 (09:43 +0000)]
Auto merge of #1457 - RalfJung:rustup, r=RalfJung

rustup

4 years agorustup
Ralf Jung [Thu, 25 Jun 2020 09:34:52 +0000 (11:34 +0200)]
rustup

4 years agoAuto merge of #1455 - RalfJung:rustup, r=RalfJung
bors [Mon, 22 Jun 2020 11:10:06 +0000 (11:10 +0000)]
Auto merge of #1455 - RalfJung:rustup, r=RalfJung

Rustup

also stop testing with mir opts as they are currently broken

4 years agorustup; stop testing with mir opts as they are currently broken
Ralf Jung [Mon, 22 Jun 2020 09:38:34 +0000 (11:38 +0200)]
rustup; stop testing with mir opts as they are currently broken

4 years agoadd a miscompilation test
Ralf Jung [Mon, 22 Jun 2020 09:32:01 +0000 (11:32 +0200)]
add a miscompilation test

4 years agoAuto merge of #1454 - RalfJung:test-raw-ptr, r=RalfJung
bors [Sat, 20 Jun 2020 12:36:25 +0000 (12:36 +0000)]
Auto merge of #1454 - RalfJung:test-raw-ptr, r=RalfJung

Test raw_ptr macro

Make sure it can create pointers to packed fields, but *cannot* deref dangling or unaligned (raw) pointers.

4 years agounaligned-raw-deref is always UB
Ralf Jung [Sat, 20 Jun 2020 12:34:57 +0000 (14:34 +0200)]
unaligned-raw-deref is always UB

4 years agomake sure the raw_ptr macros also avoid UB
Ralf Jung [Sat, 20 Jun 2020 12:31:47 +0000 (14:31 +0200)]
make sure the raw_ptr macros also avoid UB

4 years agomake sure '&raw *' on a dangling raw ptr is UB
Ralf Jung [Sat, 20 Jun 2020 12:28:55 +0000 (14:28 +0200)]
make sure '&raw *' on a dangling raw ptr is UB

4 years agoAuto merge of #1453 - RalfJung:rustup, r=RalfJung
bors [Sat, 20 Jun 2020 09:49:25 +0000 (09:49 +0000)]
Auto merge of #1453 - RalfJung:rustup, r=RalfJung

bump Rust

4 years agobump Rust
Ralf Jung [Sat, 20 Jun 2020 09:48:42 +0000 (11:48 +0200)]
bump Rust

4 years agoAuto merge of #1451 - RalfJung:rustup, r=RalfJung
bors [Mon, 15 Jun 2020 15:39:08 +0000 (15:39 +0000)]
Auto merge of #1451 - RalfJung:rustup, r=RalfJung

rustup

4 years agorustup
Ralf Jung [Mon, 15 Jun 2020 15:38:27 +0000 (17:38 +0200)]
rustup

4 years agoAuto merge of #1450 - RalfJung:rustup, r=RalfJung
bors [Mon, 15 Jun 2020 08:59:06 +0000 (08:59 +0000)]
Auto merge of #1450 - RalfJung:rustup, r=RalfJung

rustup

4 years agorustup
Ralf Jung [Mon, 15 Jun 2020 08:58:20 +0000 (10:58 +0200)]
rustup

4 years agoAuto merge of #1448 - RalfJung:rustup, r=RalfJung
bors [Sat, 13 Jun 2020 09:31:32 +0000 (09:31 +0000)]
Auto merge of #1448 - RalfJung:rustup, r=RalfJung

rustup; and a bit of UnsafeCell detection refactoring

4 years agorustup; and a bit of UnsafeCell detection refactoring
Ralf Jung [Sat, 13 Jun 2020 09:30:31 +0000 (11:30 +0200)]
rustup; and a bit of UnsafeCell detection refactoring

4 years agoAuto merge of #1447 - RalfJung:rustup, r=RalfJung
bors [Fri, 12 Jun 2020 08:18:12 +0000 (08:18 +0000)]
Auto merge of #1447 - RalfJung:rustup, r=RalfJung

rustup

This seems to be the latest version that works before *something* broke -- so let's make this a baseline.

4 years agorustup
Ralf Jung [Fri, 12 Jun 2020 08:00:46 +0000 (10:00 +0200)]
rustup

4 years agoAuto merge of #1446 - RalfJung:rustup, r=RalfJung
bors [Wed, 10 Jun 2020 08:56:39 +0000 (08:56 +0000)]
Auto merge of #1446 - RalfJung:rustup, r=RalfJung

rustup

just making sure everything keeps working

4 years agorustup
Ralf Jung [Wed, 10 Jun 2020 08:55:48 +0000 (10:55 +0200)]
rustup

4 years agoAuto merge of #1418 - divergentdave:file-sync, r=RalfJung
bors [Tue, 9 Jun 2020 08:48:40 +0000 (08:48 +0000)]
Auto merge of #1418 - divergentdave:file-sync, r=RalfJung

Add file sync shims

This PR adds shim implementations for these related file syncing functions.
* `fsync`, for POSIX targets, backed by `File::sync_all()`
* `fdatasync`, for POSIX targets, backed by `File::sync_data()`
* `fcntl` with command `F_FULLFSYNC`, for macOS targets, backed by `File::sync_all()`
* `sync_file_range`, for Linux targets, backed by `File::sync_data()`

4 years agoExtract common logic for Windows host workaround
David Cook [Mon, 8 Jun 2020 23:34:02 +0000 (23:34 +0000)]
Extract common logic for Windows host workaround

4 years agoAuto merge of #1445 - JOE1994:patch-1, r=RalfJung
bors [Mon, 8 Jun 2020 23:26:59 +0000 (23:26 +0000)]
Auto merge of #1445 - JOE1994:patch-1, r=RalfJung

Add a case to list of 'StackedBorrows violations'

A small fix was made to libstd in rust-lang/rust#70479 (back in March).
(Miri reported UB due to Stacked Borrows violation - [link to Miri error log](https://github.com/rust-lang/miri/pull/1225#discussion_r397830221))

Thank you for reviewing :+1:

4 years agoAdd a case to list of 'StackedBorrows violations'
Youngsuk Kim [Mon, 8 Jun 2020 21:30:43 +0000 (17:30 -0400)]
Add a case to list of 'StackedBorrows violations'

A small fix was made to libstd in rust-lang/rust#70479 (back in March).
(Miri reported UB due to Stacked Borrows violation - [link to Miri error log](https://github.com/rust-lang/miri/pull/1225#discussion_r397830221))

Thank you for reviewing :+1:

4 years agoFinish fixing Windows host support
David Cook [Sat, 6 Jun 2020 16:54:13 +0000 (16:54 +0000)]
Finish fixing Windows host support

4 years agoAuto merge of #1444 - RalfJung:rustup, r=RalfJung
bors [Wed, 3 Jun 2020 07:41:37 +0000 (07:41 +0000)]
Auto merge of #1444 - RalfJung:rustup, r=RalfJung

rustup, and adjust timing tests

I saw a timing failure on macOS, so leave some more slack space.

4 years agorustup, and adjust timing tests
Ralf Jung [Wed, 3 Jun 2020 07:40:21 +0000 (09:40 +0200)]
rustup, and adjust timing tests

4 years agoAuto merge of #1443 - RalfJung:rustup, r=RalfJung
bors [Mon, 1 Jun 2020 17:25:04 +0000 (17:25 +0000)]
Auto merge of #1443 - RalfJung:rustup, r=RalfJung

rustup

Just quickly get things to work with the TLS changes.

Eventually I'll look into properly making use of the new infrastructure, but I don't have time right now.

4 years agorustup
Ralf Jung [Mon, 1 Jun 2020 17:23:54 +0000 (19:23 +0200)]
rustup

4 years agoAuto merge of #1440 - RalfJung:wtf8, r=RalfJung
bors [Sun, 31 May 2020 23:15:23 +0000 (23:15 +0000)]
Auto merge of #1440 - RalfJung:wtf8, r=RalfJung

test WTF8 encoding corner cases

This adds a Miri-side test for https://github.com/rust-lang/rust/issues/72760.

Blocked on https://github.com/rust-lang/rust/pull/72683.

4 years agorustup
Ralf Jung [Sun, 31 May 2020 23:15:00 +0000 (01:15 +0200)]
rustup

4 years agotest WTF8 encoding corner cases
Ralf Jung [Sat, 30 May 2020 16:46:26 +0000 (18:46 +0200)]
test WTF8 encoding corner cases

4 years agoAuto merge of #1441 - RalfJung:sync-cleanup, r=RalfJung
bors [Sun, 31 May 2020 09:10:19 +0000 (09:10 +0000)]
Auto merge of #1441 - RalfJung:sync-cleanup, r=RalfJung

Synchronization primitive cleanup

Make some methods infallible, move a bit more work into the platform-independent `sync.rs`, and fix a bug in rwlock unlocking.

4 years agoAuto merge of #1442 - RalfJung:rustup, r=RalfJung
bors [Sun, 31 May 2020 08:30:51 +0000 (08:30 +0000)]
Auto merge of #1442 - RalfJung:rustup, r=RalfJung

rustup, adjust error message

4 years agorustup, adjust error message
Ralf Jung [Sun, 31 May 2020 08:30:25 +0000 (10:30 +0200)]
rustup, adjust error message

4 years agomake mutex_unlock infallible
Ralf Jung [Sat, 30 May 2020 20:54:37 +0000 (22:54 +0200)]
make mutex_unlock infallible

4 years agoupdate unsupported example in README (now that threading is supported on some platforms)
Ralf Jung [Sat, 30 May 2020 20:50:49 +0000 (22:50 +0200)]
update unsupported example in README (now that threading is supported on some platforms)

4 years agotest and fix for rwlock unlock bug
Ralf Jung [Sat, 30 May 2020 20:48:43 +0000 (22:48 +0200)]
test and fix for rwlock unlock bug

4 years agoalso combine re-locking into the dequeue-and-unblock operation
Ralf Jung [Sat, 30 May 2020 20:35:58 +0000 (22:35 +0200)]
also combine re-locking into the dequeue-and-unblock operation

4 years agosync cleanup: mark infallible ops as such; consistent combine en/dequeue with (un...
Ralf Jung [Sat, 30 May 2020 20:29:27 +0000 (22:29 +0200)]
sync cleanup: mark infallible ops as such; consistent combine en/dequeue with (un)block; comments

4 years agoAuto merge of #1412 - josephlr:ptr, r=RalfJung
bors [Sat, 30 May 2020 07:29:19 +0000 (07:29 +0000)]
Auto merge of #1412 - josephlr:ptr, r=RalfJung

Remove pointer arithmetic intrinsics

**Do Not Merge** until https://github.com/rust-lang/rust/pull/71500 is in nightly.

As https://github.com/rust-lang/rust/pull/71500 implements `offset` and `arith_offset` in rustc's MIR interpreter, these implementations can now be removed from miri. Also, the `pointer_offset_inbounds` method has been moved to the main MIR engine, so that too can be removed.

Signed-off-by: Joe Richey <joerichey@google.com>
4 years agorustup (and account for stabilization)
Ralf Jung [Sat, 30 May 2020 07:14:56 +0000 (09:14 +0200)]
rustup (and account for stabilization)

4 years agoRemove pointer arithmetic intrinsics
Joe Richey [Fri, 15 May 2020 08:44:41 +0000 (01:44 -0700)]
Remove pointer arithmetic intrinsics

These are now implemented in rustc's mir interpreter

Signed-off-by: Joe Richey <joerichey@google.com>
4 years agoAuto merge of #1439 - RalfJung:rustup, r=RalfJung
bors [Fri, 29 May 2020 08:01:40 +0000 (08:01 +0000)]
Auto merge of #1439 - RalfJung:rustup, r=RalfJung

str_strip is stable

4 years agostr_strip is stable
Ralf Jung [Fri, 29 May 2020 08:01:07 +0000 (10:01 +0200)]
str_strip is stable

4 years agoAuto merge of #1422 - RalfJung:cargo-miri-workspace, r=oli-obk
bors [Thu, 28 May 2020 13:02:41 +0000 (13:02 +0000)]
Auto merge of #1422 - RalfJung:cargo-miri-workspace, r=oli-obk

Move cargo-miri into separate package

So far, `cargo-miri` depended on the Miri library crate. That was mostly for convenience (to avoid having to deal with workspaces), but also because until recently `cargo-miri` needed access to the ["Miri default flags"](https://github.com/rust-lang/miri/blob/af044209b02f561adb3dad9f5f0deea7378f0ac0/src/lib.rs#L75). But with `MIRI_BE_RUSTC` that is no longer the case, so we can remove this fake dependency. :)

@oli-obk what do you think? Also I expect the rustc bootstrap integration will need updates, hints would be appreciated. :D

4 years agoAuto merge of #1438 - RalfJung:rustup, r=RalfJung
bors [Thu, 28 May 2020 07:19:33 +0000 (07:19 +0000)]
Auto merge of #1438 - RalfJung:rustup, r=RalfJung

rustup

Just ensuring everything still works.

4 years agorustup
Ralf Jung [Thu, 28 May 2020 07:19:01 +0000 (09:19 +0200)]
rustup

4 years agocargo-miri: allow overwriting miri command, and make that consistent with compiletest
Ralf Jung [Thu, 21 May 2020 12:24:41 +0000 (14:24 +0200)]
cargo-miri: allow overwriting miri command, and make that consistent with compiletest

4 years agono workspace as that is incompatible with the rustc submodule
Ralf Jung [Thu, 21 May 2020 12:18:18 +0000 (14:18 +0200)]
no workspace as that is incompatible with the rustc submodule

4 years agore-add some fake dependencies to avoid rebuilds
Ralf Jung [Thu, 21 May 2020 09:21:03 +0000 (11:21 +0200)]
re-add some fake dependencies to avoid rebuilds

4 years agofmt
Ralf Jung [Thu, 21 May 2020 09:32:12 +0000 (11:32 +0200)]
fmt

4 years agomake sure CI fails when we do not recognize the platform
Ralf Jung [Thu, 21 May 2020 09:30:37 +0000 (11:30 +0200)]
make sure CI fails when we do not recognize the platform

4 years agojust respect existing RUSTFLAGS instead of providing another override
Ralf Jung [Thu, 21 May 2020 09:23:04 +0000 (11:23 +0200)]
just respect existing RUSTFLAGS instead of providing another override

4 years agomake cargo-miri a separate crate in a workspace
Ralf Jung [Thu, 21 May 2020 09:00:06 +0000 (11:00 +0200)]
make cargo-miri a separate crate in a workspace

4 years agoAuto merge of #1437 - RalfJung:strip, r=RalfJung
bors [Thu, 28 May 2020 06:52:42 +0000 (06:52 +0000)]
Auto merge of #1437 - RalfJung:strip, r=RalfJung

use strip_prefix where it makes sense

4 years agouse strip_prefix where it makes sense
Ralf Jung [Thu, 28 May 2020 06:51:38 +0000 (08:51 +0200)]
use strip_prefix where it makes sense

4 years agoFix fsync shim for Windows hosts with RO files
David Cook [Tue, 26 May 2020 00:50:06 +0000 (19:50 -0500)]
Fix fsync shim for Windows hosts with RO files

4 years agoFix test on Windows hosts
David Cook [Mon, 25 May 2020 18:20:29 +0000 (13:20 -0500)]
Fix test on Windows hosts

FlushFileBuffers requires that a file be opened for writing

4 years agoUpdate comments
David Cook [Sun, 24 May 2020 18:17:16 +0000 (13:17 -0500)]
Update comments

4 years agoAuto merge of #1435 - RalfJung:stdin-read-error, r=RalfJung
bors [Mon, 25 May 2020 08:47:28 +0000 (08:47 +0000)]
Auto merge of #1435 - RalfJung:stdin-read-error, r=RalfJung

better error when using FDs 0-2 the wrong way

4 years agobetter error when reading from stdin
Ralf Jung [Mon, 25 May 2020 08:39:37 +0000 (10:39 +0200)]
better error when reading from stdin

4 years agoAuto merge of #1433 - RalfJung:condattr-setclock, r=RalfJung
bors [Mon, 25 May 2020 07:59:21 +0000 (07:59 +0000)]
Auto merge of #1433 - RalfJung:condattr-setclock, r=RalfJung

macOS does not have pthread_condattr_setclock/getclock

4 years agoadd an assertion
Ralf Jung [Mon, 25 May 2020 07:45:42 +0000 (09:45 +0200)]
add an assertion

4 years agomacos does not have pthread_condattr_setclock/getclock
Ralf Jung [Mon, 25 May 2020 07:42:08 +0000 (09:42 +0200)]
macos does not have pthread_condattr_setclock/getclock

4 years agoAuto merge of #1362 - vakaras:add-sync-primitives-cr1, r=RalfJung
bors [Mon, 25 May 2020 07:02:53 +0000 (07:02 +0000)]
Auto merge of #1362 - vakaras:add-sync-primitives-cr1, r=RalfJung

Add sync primitives

This is a follow up PR for https://github.com/rust-lang/miri/pull/1284 that adds support for the missing synchronization primitives.

Sorry for flooding with PRs, but my internship is coming to an end and I need to get things out.

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

4 years agoIncrease the elapsed time window.
Vytautas Astrauskas [Mon, 25 May 2020 06:07:07 +0000 (08:07 +0200)]
Increase the elapsed time window.

4 years agoFix compilation errors after rebase.
Vytautas Astrauskas [Sun, 24 May 2020 22:28:01 +0000 (00:28 +0200)]
Fix compilation errors after rebase.

4 years agoSmall fixes.
Vytautas Astrauskas [Sun, 24 May 2020 18:29:56 +0000 (20:29 +0200)]
Small fixes.

4 years agoFix #1419.
Vytautas Astrauskas [Sun, 24 May 2020 18:20:28 +0000 (20:20 +0200)]
Fix #1419.

4 years agoSmall changes.
Vytautas Astrauskas [Tue, 19 May 2020 16:44:32 +0000 (18:44 +0200)]
Small changes.

4 years agoRewrite notify all test.
Vytautas Astrauskas [Tue, 19 May 2020 16:33:26 +0000 (18:33 +0200)]
Rewrite notify all test.

4 years agoSmall changes.
Vytautas Astrauskas [Tue, 19 May 2020 14:47:25 +0000 (16:47 +0200)]
Small changes.

4 years agoChange the scheduling to execute timeout callbacks first.
Vytautas Astrauskas [Tue, 19 May 2020 14:26:42 +0000 (16:26 +0200)]
Change the scheduling to execute timeout callbacks first.

4 years agoSmall changes.
Vytautas Astrauskas [Mon, 18 May 2020 15:18:15 +0000 (17:18 +0200)]
Small changes.

4 years agoAdd comments explaining the declare_id macro.
Vytautas Astrauskas [Mon, 18 May 2020 14:39:19 +0000 (16:39 +0200)]
Add comments explaining the declare_id macro.

4 years agoChange how the time is handled.
Vytautas Astrauskas [Mon, 18 May 2020 14:28:19 +0000 (16:28 +0200)]
Change how the time is handled.

4 years agoCleanup Condvar tests.
Vytautas Astrauskas [Thu, 30 Apr 2020 22:37:27 +0000 (15:37 -0700)]
Cleanup Condvar tests.

4 years agoAdd a timeout test for conditional variables.
Vytautas Astrauskas [Thu, 30 Apr 2020 21:59:35 +0000 (14:59 -0700)]
Add a timeout test for conditional variables.

4 years agoMove all run-pass synchronization primitive tests to sync.rs.
Vytautas Astrauskas [Thu, 30 Apr 2020 21:48:09 +0000 (14:48 -0700)]
Move all run-pass synchronization primitive tests to sync.rs.

4 years agoImprove code readability and comments.
Vytautas Astrauskas [Thu, 30 Apr 2020 21:07:07 +0000 (14:07 -0700)]
Improve code readability and comments.

4 years agoCleanup.
Vytautas Astrauskas [Thu, 30 Apr 2020 20:47:12 +0000 (13:47 -0700)]
Cleanup.

4 years agoImplement support for synchronization primitives.
Vytautas Astrauskas [Tue, 21 Apr 2020 23:38:14 +0000 (16:38 -0700)]
Implement support for synchronization primitives.

4 years agoAuto merge of #1432 - RalfJung:int-size, r=RalfJung
bors [Sun, 24 May 2020 17:21:20 +0000 (17:21 +0000)]
Auto merge of #1432 - RalfJung:int-size, r=RalfJung

use helper method to compute size of int type

4 years agouse helper method to compute size of int type
Ralf Jung [Sun, 24 May 2020 17:20:44 +0000 (19:20 +0200)]
use helper method to compute size of int type

4 years agoAuto merge of #1426 - RalfJung:no-wrapper, r=RalfJung
bors [Sun, 24 May 2020 12:48:12 +0000 (12:48 +0000)]
Auto merge of #1426 - RalfJung:no-wrapper, r=RalfJung

unset RUSTC_WRAPPER for xargo invocation

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

@bjorn3 @oli-obk do you think that is a reasonable way to solve this issue?

4 years agounset RUSTC_WRAPPER for xargo invocation
Ralf Jung [Fri, 22 May 2020 08:12:32 +0000 (10:12 +0200)]
unset RUSTC_WRAPPER for xargo invocation

4 years agoAuto merge of #1431 - RalfJung:rustup, r=RalfJung
bors [Sun, 24 May 2020 12:01:05 +0000 (12:01 +0000)]
Auto merge of #1431 - RalfJung:rustup, r=RalfJung

rustup

Just making sure it all still works.

4 years agorustup
Ralf Jung [Sun, 24 May 2020 12:00:32 +0000 (14:00 +0200)]
rustup

4 years agoAuto merge of #1430 - RalfJung:unsize, r=RalfJung
bors [Sun, 24 May 2020 10:15:05 +0000 (10:15 +0000)]
Auto merge of #1430 - RalfJung:unsize, r=RalfJung

add interesting unsizing test

@bors r+

4 years agoadd interesting unsizing test
Ralf Jung [Sun, 24 May 2020 09:58:19 +0000 (11:58 +0200)]
add interesting unsizing test