Commit Graph

5012 Commits

Author SHA1 Message Date
bors
bde2eb4a44 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.
2020-06-27 11:27:36 +00:00
Ralf Jung
af5887e869 module organization: move platform-specific code to shims::{posix::{linux, macos}, windows} 2020-06-27 13:22:49 +02:00
Ralf Jung
395f5d40dc Rename shims::{sync -> posic_sync} and move sync_singlethread test to other sync test 2020-06-27 12:37:12 +02:00
bors
02a721b91c Auto merge of #1459 - RalfJung:ptr_guaranteed_eq, r=RalfJung
supply our own implementation of the CTFE pointer comparison intrinsics
2020-06-27 10:15:01 +00:00
Ralf Jung
b46f946c81 supply our own implementation of the CTFE pointer comparison intrinsics 2020-06-27 11:57:43 +02:00
bors
76d99cfa68 Auto merge of #1458 - RalfJung:rustup, r=RalfJung
bump Rust
2020-06-26 18:36:58 +00:00
Ralf Jung
3ea8c5fa33 bump Rust 2020-06-26 20:36:08 +02:00
bors
1875c59301 Auto merge of #1457 - RalfJung:rustup, r=RalfJung
rustup
2020-06-25 09:43:51 +00:00
Ralf Jung
9d41e4c899 rustup 2020-06-25 11:34:52 +02:00
bors
3444456214 Auto merge of #1455 - RalfJung:rustup, r=RalfJung
Rustup

also stop testing with mir opts as they are currently broken
2020-06-22 11:10:06 +00:00
Ralf Jung
4788f775f8 rustup; stop testing with mir opts as they are currently broken 2020-06-22 13:09:39 +02:00
Ralf Jung
2e5a0dc172 add a miscompilation test 2020-06-22 11:32:01 +02:00
bors
31ad5f6b2b 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.
2020-06-20 12:36:25 +00:00
Ralf Jung
8d1d572472 unaligned-raw-deref is always UB 2020-06-20 14:34:57 +02:00
Ralf Jung
03fe3772a8 make sure the raw_ptr macros also avoid UB 2020-06-20 14:31:47 +02:00
Ralf Jung
a29f86b512 make sure '&raw *' on a dangling raw ptr is UB 2020-06-20 14:28:55 +02:00
bors
59619775ee Auto merge of #1453 - RalfJung:rustup, r=RalfJung
bump Rust
2020-06-20 09:49:25 +00:00
Ralf Jung
2940da9d1f bump Rust 2020-06-20 11:48:42 +02:00
bors
146ee66268 Auto merge of #1451 - RalfJung:rustup, r=RalfJung
rustup
2020-06-15 15:39:08 +00:00
Ralf Jung
5c5b61ffb0 rustup 2020-06-15 17:38:27 +02:00
bors
b8ecc9aff8 Auto merge of #1450 - RalfJung:rustup, r=RalfJung
rustup
2020-06-15 08:59:06 +00:00
Ralf Jung
9df8d588ea rustup 2020-06-15 10:58:20 +02:00
bors
4575ee13ca Auto merge of #1448 - RalfJung:rustup, r=RalfJung
rustup; and a bit of UnsafeCell detection refactoring
2020-06-13 09:31:32 +00:00
Ralf Jung
e063ce2737 rustup; and a bit of UnsafeCell detection refactoring 2020-06-13 11:30:31 +02:00
bors
e26029a596 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.
2020-06-12 08:18:12 +00:00
Ralf Jung
3994352405 rustup 2020-06-12 10:13:49 +02:00
bors
31f3d447c6 Auto merge of #1446 - RalfJung:rustup, r=RalfJung
rustup

just making sure everything keeps working
2020-06-10 08:56:39 +00:00
Ralf Jung
34f495a994 rustup 2020-06-10 10:55:48 +02:00
bors
ffd03b3caa 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()`
2020-06-09 08:48:40 +00:00
David Cook
a60c130b0d Extract common logic for Windows host workaround 2020-06-08 23:34:02 +00:00
bors
09b5755fff 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 👍
2020-06-08 23:26:59 +00:00
Youngsuk Kim
ea4a5587ca
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 👍
2020-06-08 17:30:43 -04:00
David Cook
e352d4fbb7 Finish fixing Windows host support 2020-06-06 16:54:13 +00:00
bors
592d621b78 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.
2020-06-03 07:41:37 +00:00
Ralf Jung
dcb2b30982 rustup, and adjust timing tests 2020-06-03 09:40:21 +02:00
bors
faff9a7ad9 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.
2020-06-01 17:25:04 +00:00
Ralf Jung
17dd44ee92 rustup 2020-06-01 19:23:54 +02:00
bors
a8df047f5c 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.
2020-05-31 23:15:23 +00:00
Ralf Jung
7cd68eb11b rustup 2020-06-01 01:15:00 +02:00
Ralf Jung
7d406b152a test WTF8 encoding corner cases 2020-06-01 01:12:31 +02:00
bors
4fd0aa316e 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.
2020-05-31 09:10:19 +00:00
bors
177d5f861f Auto merge of #1442 - RalfJung:rustup, r=RalfJung
rustup, adjust error message
2020-05-31 08:30:51 +00:00
Ralf Jung
3032224d19 rustup, adjust error message 2020-05-31 10:30:25 +02:00
Ralf Jung
0b6ec575b9 make mutex_unlock infallible 2020-05-30 22:54:37 +02:00
Ralf Jung
67ad304140 update unsupported example in README (now that threading is supported on some platforms) 2020-05-30 22:50:49 +02:00
Ralf Jung
acb3ec0866 test and fix for rwlock unlock bug 2020-05-30 22:48:43 +02:00
Ralf Jung
a80821e046 also combine re-locking into the dequeue-and-unblock operation 2020-05-30 22:35:58 +02:00
Ralf Jung
7589bc7ba9 sync cleanup: mark infallible ops as such; consistent combine en/dequeue with (un)block; comments 2020-05-30 22:29:27 +02:00
bors
508371ac5a 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>
2020-05-30 07:29:19 +00:00
Ralf Jung
c77e9022d5 rustup (and account for stabilization) 2020-05-30 09:23:25 +02:00