]>
git.lizzy.rs Git - rust.git/log
Vytautas Astrauskas [Thu, 16 Apr 2020 19:26:32 +0000 (12:26 -0700)]
Fix typo in a comment.
Vytautas Astrauskas [Thu, 16 Apr 2020 19:22:58 +0000 (12:22 -0700)]
Make an assert message consistent with other asserts.
Vytautas Astrauskas [Thu, 16 Apr 2020 19:22:30 +0000 (12:22 -0700)]
Fix imports.
Vytautas Astrauskas [Thu, 16 Apr 2020 19:21:01 +0000 (12:21 -0700)]
Add a missing newline in the test.
Vytautas Astrauskas [Thu, 16 Apr 2020 15:34:30 +0000 (08:34 -0700)]
Rename eval_maybe_thread_local_static_const to adjust_global_const.
Vytautas Astrauskas [Thu, 16 Apr 2020 04:25:12 +0000 (21:25 -0700)]
Address some of the reviewers comments.
Vytautas Astrauskas [Wed, 15 Apr 2020 21:34:34 +0000 (14:34 -0700)]
Generate thread local allocations in eval_maybe_thread_local_static_const.
Vytautas Astrauskas [Wed, 15 Apr 2020 00:21:52 +0000 (17:21 -0700)]
Generate fresh allocation ids for thread locals in eval_maybe_thread_local_static_const.
Vytautas Astrauskas [Thu, 9 Apr 2020 20:37:38 +0000 (13:37 -0700)]
Small refactoring in pthread sync: extract common functionallity to separate functions.
Vytautas Astrauskas [Thu, 9 Apr 2020 19:06:33 +0000 (12:06 -0700)]
Rename ThreadSet to ThreadManager.
Vytautas Astrauskas [Wed, 8 Apr 2020 03:20:41 +0000 (20:20 -0700)]
Rebase on PR 1157.
Vytautas Astrauskas [Mon, 6 Apr 2020 23:30:30 +0000 (16:30 -0700)]
Fix pthread_self.
Vytautas Astrauskas [Mon, 6 Apr 2020 23:12:25 +0000 (16:12 -0700)]
Rustfmt the test.
Vytautas Astrauskas [Mon, 6 Apr 2020 23:12:13 +0000 (16:12 -0700)]
Store the thread name.
Vytautas Astrauskas [Mon, 6 Apr 2020 21:41:05 +0000 (14:41 -0700)]
Fix comments in TLS.
Vytautas Astrauskas [Mon, 6 Apr 2020 21:00:45 +0000 (14:00 -0700)]
Report that we do not support foreign thread local statics.
Vytautas Astrauskas [Mon, 6 Apr 2020 20:44:47 +0000 (13:44 -0700)]
Move pthread_create and related shims to a separate file.
Vytautas Astrauskas [Fri, 3 Apr 2020 23:09:42 +0000 (16:09 -0700)]
Fix the problem of sending pointed to thread local statics. Add a regression test.
Vytautas Astrauskas [Wed, 1 Apr 2020 23:28:53 +0000 (16:28 -0700)]
Add a test for thread locals.
Vytautas Astrauskas [Wed, 1 Apr 2020 23:28:33 +0000 (16:28 -0700)]
Update to support the updated API.
Vytautas Astrauskas [Wed, 1 Apr 2020 23:26:41 +0000 (16:26 -0700)]
Add a warning that Miri does not check for data-races.
Vytautas Astrauskas [Mon, 16 Mar 2020 23:48:44 +0000 (16:48 -0700)]
Implement basic support for concurrency (Linux only).
bors [Mon, 27 Apr 2020 10:54:57 +0000 (10:54 +0000)]
Auto merge of #1373 - RalfJung:test-rename, r=RalfJung
rename tests: undefined -> uninit
bors [Mon, 27 Apr 2020 10:33:29 +0000 (10:33 +0000)]
Auto merge of #1370 - samrat:add-scalar-size-test, r=RalfJung
Add test to verify that argument size mismatch throws UB
Also, bump up `rust-version`
Closes #1355
Ralf Jung [Mon, 27 Apr 2020 10:27:56 +0000 (12:27 +0200)]
rename tests: undefined -> uninit
Samrat Man Singh [Mon, 27 Apr 2020 10:04:42 +0000 (15:34 +0530)]
Replace error-pattern with annotation; remove unreachable line
bors [Mon, 27 Apr 2020 09:33:30 +0000 (09:33 +0000)]
Auto merge of #1354 - divergentdave:dump-alloc-on-undef-read, r=RalfJung
Print hex dump of alloc on reading undef bytes
Here's a small addition I made locally to the UB diagnostics, in case you're interested in it. This PR calls `dump_alloc()` on the relevant allocation if Miri fails on UB due to reading undefined bytes. This came in handy when diagnosing such an issue in a large program using unsafe Rust, in part because it wasn't deterministic enough to use `-Zmiri-track-alloc-id=`. If you'd like to put this behind another -Z flag, let me know.
Samrat Man Singh [Mon, 27 Apr 2020 04:30:35 +0000 (10:00 +0530)]
Fix shim_arg_size test for 32-bit machines
Samrat Man Singh [Mon, 27 Apr 2020 04:05:19 +0000 (09:35 +0530)]
Add test to verify arg size mismatch throws UB
Also: bump up `rust-version`
David Cook [Mon, 27 Apr 2020 03:13:36 +0000 (22:13 -0500)]
Review comments
bors [Sat, 25 Apr 2020 21:19:56 +0000 (21:19 +0000)]
Auto merge of #1368 - Robbepop:add-new-trophy-for-inks-lazyarray, r=RalfJung
Add miri trophy for LazyArray::swap (ink! PR)
Details to the found in https://github.com/rust-lang/miri/issues/1364.
Note that this was not a found in a `master` or production release of ink!, however without analysing the code via `miri` this could have potentially happened.
Hero Bird [Sat, 25 Apr 2020 17:42:48 +0000 (19:42 +0200)]
Update README.md
Hero Bird [Sat, 25 Apr 2020 12:58:20 +0000 (14:58 +0200)]
Add miri trophy for LazyArray::swap (ink! PR)
Details to the found in https://github.com/rust-lang/miri/issues/1364.
Note that this was not a found in a `master` or production release of ink!, however without analysing the code via `miri` this could have potentially happened.
bors [Sat, 25 Apr 2020 09:17:04 +0000 (09:17 +0000)]
Auto merge of #1366 - RalfJung:rustc-exit, r=RalfJung
fix exit code on rustc errors
Fixes https://github.com/rust-lang/miri/issues/1352
Ralf Jung [Sat, 25 Apr 2020 09:16:03 +0000 (11:16 +0200)]
make sure we do not discard information on the Ok exit side
Ralf Jung [Sat, 25 Apr 2020 09:12:50 +0000 (11:12 +0200)]
fix exit code on rustc errors
David Cook [Fri, 24 Apr 2020 01:00:25 +0000 (20:00 -0500)]
Add test to exercise InvalidUndefBytes
David Cook [Fri, 24 Apr 2020 01:00:09 +0000 (20:00 -0500)]
Add message before dumping alloc
bors [Thu, 23 Apr 2020 22:54:29 +0000 (22:54 +0000)]
Auto merge of #1361 - RalfJung:rustup, r=RalfJung
rustup
Ralf Jung [Thu, 23 Apr 2020 22:52:43 +0000 (00:52 +0200)]
rustup
bors [Thu, 23 Apr 2020 17:44:25 +0000 (17:44 +0000)]
Auto merge of #1358 - dtolnay:ci, r=RalfJung
Disable interactive prompts in CI
Closes #1357.
David Tolnay [Thu, 23 Apr 2020 17:27:38 +0000 (10:27 -0700)]
Keep MiriCommand out of ask_to_run function
bors [Thu, 23 Apr 2020 17:23:05 +0000 (17:23 +0000)]
Auto merge of #1359 - RalfJung:cargo-bin-exe, r=RalfJung
test suite: rely on CARGO_BIN_EXE_ env vars
Just read about this in the 1.43 release notes. :)
Ralf Jung [Thu, 23 Apr 2020 17:20:09 +0000 (19:20 +0200)]
test suite: rely on CARGO_BIN_EXE_ env vars to find Miri binary
David Tolnay [Thu, 23 Apr 2020 17:12:48 +0000 (10:12 -0700)]
Preserve consistent output whether or not CI is set
David Tolnay [Thu, 23 Apr 2020 16:12:05 +0000 (09:12 -0700)]
Remove unneeded setup step from CI instructions in readme
David Tolnay [Thu, 23 Apr 2020 15:46:49 +0000 (08:46 -0700)]
Disable interactive prompts in CI
bors [Thu, 23 Apr 2020 09:19:50 +0000 (09:19 +0000)]
Auto merge of #1356 - brson:trophy, r=RalfJung
Add ryu and tikv to trophy case
Brian Anderson [Thu, 23 Apr 2020 08:46:36 +0000 (02:46 -0600)]
Update README.md
Co-Authored-By: Ralf Jung <post@ralfj.de>
Brian Anderson [Thu, 23 Apr 2020 02:37:58 +0000 (02:37 +0000)]
Add ryu and tikv to trophy case
David Cook [Wed, 22 Apr 2020 22:41:06 +0000 (17:41 -0500)]
Reorder output
bors [Wed, 22 Apr 2020 21:44:14 +0000 (21:44 +0000)]
Auto merge of #1348 - RalfJung:raw-addr-of-align, r=RalfJung
Stacked Borrows: alignment does not matter
Fixes https://github.com/rust-lang/miri/issues/1339
Requires https://github.com/rust-lang/rust/pull/71280
Ralf Jung [Wed, 22 Apr 2020 21:32:28 +0000 (23:32 +0200)]
rustup
Ralf Jung [Sat, 18 Apr 2020 11:56:09 +0000 (13:56 +0200)]
Stacked Borrows: alignment does not matter
bors [Wed, 22 Apr 2020 21:10:01 +0000 (21:10 +0000)]
Auto merge of #1353 - divergentdave:file-set-len, r=RalfJung
Implement ftruncate64/ftruncate for File::set_len
This adds a shim for `ftruncate64` (on Linux) or `ftruncate` (on macOS) to enable support for `File::set_len`, and includes a test.
David Cook [Wed, 22 Apr 2020 12:09:20 +0000 (07:09 -0500)]
Add comment
David Cook [Wed, 22 Apr 2020 02:28:22 +0000 (21:28 -0500)]
Print hex dump of alloc on reading undef bytes
David Cook [Wed, 22 Apr 2020 02:17:54 +0000 (21:17 -0500)]
Implement ftruncate64/ftruncate for File::set_len
bors [Mon, 20 Apr 2020 08:39:29 +0000 (08:39 +0000)]
Auto merge of #1335 - vakaras:add-threads-noop, r=RalfJung
Move the stack to the evaluator. (no-op PR for 70598)
The changes to Miri to make it to compile with Rustc PR https://github.com/rust-lang/rust/pull/70598.
Ralf Jung [Mon, 20 Apr 2020 08:38:38 +0000 (10:38 +0200)]
adjust for asm -> llvm_asm rename
Ralf Jung [Mon, 20 Apr 2020 08:04:17 +0000 (10:04 +0200)]
adjust for Weak::as_raw -> as_ptr rename
Ralf Jung [Mon, 20 Apr 2020 07:33:34 +0000 (09:33 +0200)]
rustup
Vytautas Astrauskas [Thu, 16 Apr 2020 17:14:46 +0000 (10:14 -0700)]
Move stack and stack_mut implementation in Machine to match their position in the trait.
Vytautas Astrauskas [Wed, 1 Apr 2020 23:55:52 +0000 (16:55 -0700)]
Move the stack to the evaluator to make Miri compile with the newest Rustc.
bors [Sun, 19 Apr 2020 14:53:02 +0000 (14:53 +0000)]
Auto merge of #1342 - divergentdave:pause-instruction, r=RalfJung
Handle std::sync::atomic::spin_loop_hint()
This PR adds support for `std::sync::atomic::spin_loop_hint()` by implementing the `llvm.x86.sse2.pause` intrinsic when the target is x86-based. It appears this is the first LLVM intrinsic in foreign_items, so I added a couple match blocks to handle it or fall through to the different OS-specific methods. I added a basic smoke test to `tests/run-pass/sync.rs`. I came across this by way of `crossbeam::utils::Backoff::spin()`, FWIW.
David Cook [Sun, 19 Apr 2020 14:22:40 +0000 (09:22 -0500)]
Review comments
bors [Sun, 19 Apr 2020 07:37:25 +0000 (07:37 +0000)]
Auto merge of #1351 - RalfJung:float-test-source, r=RalfJung
note source of float cast test values, and some more UB tests
Ralf Jung [Sun, 19 Apr 2020 07:34:54 +0000 (09:34 +0200)]
test some more extreme cast cases
Ralf Jung [Sun, 19 Apr 2020 07:21:00 +0000 (09:21 +0200)]
note source of test values
David Cook [Sun, 19 Apr 2020 00:31:02 +0000 (19:31 -0500)]
Add support for std::thread::yield_now
David Cook [Sun, 19 Apr 2020 00:16:52 +0000 (19:16 -0500)]
Flip matching
bors [Sat, 18 Apr 2020 15:55:41 +0000 (15:55 +0000)]
Auto merge of #1349 - RalfJung:machine-layouts, r=RalfJung
use pre-computed layouts some more
Ralf Jung [Sat, 18 Apr 2020 15:53:54 +0000 (17:53 +0200)]
use pre-computed layouts some more
bors [Sat, 18 Apr 2020 11:08:24 +0000 (11:08 +0000)]
Auto merge of #1347 - RalfJung:float-cast-test, r=RalfJung
rename test_cast -> test_both_cast to make purpose clearer
Ralf Jung [Sat, 18 Apr 2020 11:07:50 +0000 (13:07 +0200)]
rename test_cast -> test_both_cast to make purpose clearer
bors [Sat, 18 Apr 2020 08:13:24 +0000 (08:13 +0000)]
Auto merge of #1325 - RalfJung:float_to_int_unchecked, r=RalfJung
implement float_to_int_unchecked
@hanna-kruppe would be great if you could have a look at this.
`float.rs` tests legal casts. `test_cast` checks that both `as` casts and unchecked casts work (i.e., these are not saturating). The `compile-fail` tests should ensure that illegal casts via the intrinsic are detected as such.
Fixes https://github.com/rust-lang/miri/issues/1264
Ralf Jung [Sat, 18 Apr 2020 08:11:45 +0000 (10:11 +0200)]
use u128::MAX symbolic name
bors [Sat, 18 Apr 2020 07:16:35 +0000 (07:16 +0000)]
Auto merge of #1346 - RalfJung:dyn-layout-test, r=RalfJung
Test that we enforce dynamic layout properties (not just static ones of sized prefix)
Ralf Jung [Sat, 18 Apr 2020 07:15:59 +0000 (09:15 +0200)]
some UB gets masked by optimizations
Ralf Jung [Sat, 18 Apr 2020 00:06:36 +0000 (02:06 +0200)]
test that we check dynamic actual size of object
Ralf Jung [Fri, 17 Apr 2020 18:43:54 +0000 (20:43 +0200)]
test that we properly check dynamic alignment
bors [Fri, 17 Apr 2020 12:20:03 +0000 (12:20 +0000)]
Auto merge of #1344 - RalfJung:rustup, r=RalfJung
rustup for FieldsShape::Primitive
Ralf Jung [Fri, 17 Apr 2020 12:19:26 +0000 (14:19 +0200)]
rustup for FieldsShape::Primitive
bors [Fri, 17 Apr 2020 09:05:56 +0000 (09:05 +0000)]
Auto merge of #1343 - RalfJung:derive-packed, r=RalfJung
test #[derive] on packed struct
Ralf Jung [Fri, 17 Apr 2020 09:03:20 +0000 (11:03 +0200)]
test #[derive] on packed struct
David Cook [Fri, 17 Apr 2020 04:24:57 +0000 (23:24 -0500)]
Handle std::sync::atomic::spin_loop_hint()
bors [Thu, 16 Apr 2020 19:07:08 +0000 (19:07 +0000)]
Auto merge of #1341 - RalfJung:force-ptr-everywhere, r=oli-obk
ReadBytesAsPointer is always supported
Cc @oli-obk
Ralf Jung [Thu, 16 Apr 2020 16:35:42 +0000 (18:35 +0200)]
ReadBytesAsPointer is always supported
bors [Thu, 16 Apr 2020 07:46:57 +0000 (07:46 +0000)]
Auto merge of #1338 - RalfJung:test-cleanup, r=RalfJung
Cleanup some run-pass tests
Ralf Jung [Thu, 16 Apr 2020 07:27:40 +0000 (09:27 +0200)]
merge packed_static and packed_struct
Ralf Jung [Thu, 16 Apr 2020 07:25:12 +0000 (09:25 +0200)]
avoid test-wide allowance of unused/dead code
Ralf Jung [Thu, 16 Apr 2020 07:06:21 +0000 (09:06 +0200)]
consolidate ptr tests in fewer files
bors [Wed, 15 Apr 2020 16:09:40 +0000 (16:09 +0000)]
Auto merge of #1337 - RalfJung:intrinsic-tests, r=RalfJung
test some so-far untested intrinsics
Ralf Jung [Wed, 15 Apr 2020 16:00:16 +0000 (18:00 +0200)]
test some so-far untested intrinsics
bors [Wed, 15 Apr 2020 15:48:07 +0000 (15:48 +0000)]
Auto merge of #1334 - KrishnaSannasi:track-dealloc, r=RalfJung
add deallocation tracking
fixes #1314
Ozaren [Tue, 14 Apr 2020 23:00:56 +0000 (19:00 -0400)]
added deallocation tracking
bors [Wed, 15 Apr 2020 11:34:34 +0000 (11:34 +0000)]
Auto merge of #1336 - RalfJung:instance-sanity, r=RalfJung
tighten Instance sanity check
Let's see if we can get away with this...
Ralf Jung [Wed, 15 Apr 2020 10:41:54 +0000 (12:41 +0200)]
tighten Instance sanity check
bors [Wed, 15 Apr 2020 10:41:13 +0000 (10:41 +0000)]
Auto merge of #1330 - RalfJung:retag-return-place, r=RalfJung
retag return place
@eddyb suggested that return places should be treated like unique references for Stacked Borrows. That is implemented by this patch, but it is unfortunately quite the hack because otherwise we are retagging *references*, not places.
@eddyb does this roughly correspond to what you had in mind? (Except for whatever it is you think should happen with argument passing, which is a much bigger issue.) Also, do you think there is any way we can *test* this?
Needs https://github.com/rust-lang/rust/pull/71100 to land.
Ralf Jung [Wed, 15 Apr 2020 10:39:28 +0000 (12:39 +0200)]
rustup