Commit Graph

1491 Commits

Author SHA1 Message Date
Ralf Jung 1ac1e55f3b implement simd_eq and simd_reduce_any 2022-02-21 21:41:52 -05:00
Ralf Jung 6b8baee339 rustup; implement simd_and/or 2022-02-04 17:56:08 +01:00
Ralf Jung 3d5eb52cbd rustup: disable read_dir test for now 2022-02-04 17:17:28 +01:00
Miguel Ojeda 922962f662 Remove spurious maybe_uninit_extra
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
2022-01-11 16:17:52 +01:00
bors deb9bfd246 Auto merge of #1952 - RalfJung:self-referential, r=RalfJung
exclude mutable references to !Unpin types from uniqueness guarantees

This basically works around https://github.com/rust-lang/unsafe-code-guidelines/issues/148 by not requiring uniqueness any more for mutable references to self-referential generators. That corresponds to [the same work-around that was applied in rustc itself](https://github.com/rust-lang/rust/blob/b81553267437627af63c79c1a20c73af865a842a/compiler/rustc_middle/src/ty/layout.rs#L2482).

I am not entirely sure if this is a good idea since it might hide too many errors in case types are "accidentally" `!Unpin`. OTOH, our test suite still passes, and to my knowledge the vast majority of types is `Unpin`. (`place.layout.ty` is monomorphic, we should always exactly know which type this is.)
2022-01-09 14:10:00 +00:00
Ralf Jung 9376bf5d4d rustup 2022-01-08 17:27:48 +01:00
Ralf Jung 77cec811b4 exclude mutable references to !Unpin types from uniqueness guarantees 2022-01-01 19:01:46 +01:00
Ralf Jung 5ab0ea67f2 adjust output for calling convention check 2021-12-24 12:02:23 +01:00
Ralf Jung d8f7b831e7 add regression test 2021-12-15 19:11:08 +01:00
Ralf Jung 44cad75069 fix iteration-order-dependent output 2021-12-15 16:51:40 +01:00
bors dadcbebfbd Auto merge of #1934 - RalfJung:rustup, r=RalfJung
rustup

Cc https://github.com/rust-lang/rust/issues/91649
2021-12-08 15:19:55 +00:00
Ralf Jung 50b9b701ab rustup 2021-12-08 10:01:51 -05:00
bors 23a9d02748 Auto merge of #1933 - 5225225:1931-condvar-false-positive, r=RalfJung
Fix false positive use of uninit bytes when calling `libc::pthread_condattr_destroy`

Fixes: #1931
2021-12-08 14:51:53 +00:00
5225225 a4b2fc0c5a Adjust pthread tests 2021-12-06 21:50:14 +00:00
5225225 f0d915703c Add tests for double destroying various pthread items 2021-12-06 21:15:02 +00:00
bors 81e59e6b92 Auto merge of #1930 - tavianator:avoid-adjacent-allocations, r=RalfJung
intptrcast: Never allocate two objects directly adjecent

When two objects directly follow each other in memory, what is the
provenance of an integer cast to a pointer that points directly between
them?  For a zero-size region, it could point into the end of the first
object, or the start of the second.

We can avoid answering this difficult question by simply never
allocating two objects directly beside each other.  This fixes some of
the false positives from #1866.
2021-12-06 01:33:55 +00:00
Ralf Jung 6a98c64c8b final tweaks 2021-12-05 20:33:20 -05:00
5225225 eadeedde42 Handle uninit data in pthread_condattr_destroy 2021-12-05 19:47:29 +00:00
Ralf Jung d537ed401d rustup 2021-12-05 11:02:20 -05:00
Tavian Barnes b0a463334c intptrcast: Never allocate two objects directly adjecent
When two objects directly follow each other in memory, what is the
provenance of an integer cast to a pointer that points directly between
them?  For a zero-size region, it could point into the end of the first
object, or the start of the second.

We can avoid answering this difficult question by simply never
allocating two objects directly beside each other.  This fixes some of
the false positives from #1866.
2021-12-03 17:00:06 -05:00
Ralf Jung ee666d8987 add tests for alignment on array initialization 2021-11-28 10:07:31 -05:00
Ralf Jung 4414d96323 implement shl and shr SIMD intrinsics 2021-11-25 17:26:37 -05:00
Ralf Jung a534bbbf8a portable SIMD: add rem intrinsic; test div and rem intrinsic UB 2021-11-25 17:13:33 -05:00
bors 4f0faed6d2 Auto merge of #1922 - RalfJung:async-run-fut, r=RalfJung
async-fn test: make run_fut more general and entirely safe
2021-11-23 19:44:55 +00:00
Ralf Jung c4502cbbe8 async-fn test: make run_fut more general and entirely safe 2021-11-23 14:33:00 -05:00
Ralf Jung 7dd1f0571c test for overflow-checks=off 2021-11-23 14:07:46 -05:00
Ralf Jung b816cb94e7 implement SIMD sub, mul, div; also test i32 binops 2021-11-20 22:30:49 -05:00
Ralf Jung 0766da6fbe implement simd_add 2021-11-20 22:30:49 -05:00
Ralf Jung d8bee92aee rename track-raw-pointers flag to tag-raw-pointers 2021-11-13 15:48:27 -05:00
Noah Lev 1cca2acf95 Add test for uninit raw ptrs 2021-11-10 11:36:42 -08:00
Noah Lev b3be6b44b6 Add tests for -Zmiri-check-number-validity 2021-11-10 11:36:42 -08:00
Noah Lev 6d1d8c69a0 rustup 2021-11-01 16:12:38 -07:00
Ralf Jung a6b12c229b rustup; add swap_remove test 2021-10-21 09:49:19 -04:00
Ralf Jung f040413af8 rustup 2021-10-12 11:39:06 -04:00
Noah Lev e751c7b04e rustup 2021-10-07 11:52:11 -07:00
Noah Lev 9af75a824f rustup
Update to the `HEAD` commit of rust-lang/rust and fix test failure.
2021-10-05 13:13:06 -07:00
DrMeepster e6a27a68fa implement #[global_allocator] 2021-09-28 20:32:53 -07:00
hyd-dev 9a877b80fe Add #[allow(dead_code)] in some tests 2021-09-11 18:58:57 +08:00
DrMeepster 84b058ac47 add support for #[start] 2021-09-02 15:41:10 -07:00
hyd-dev 7301fe118a Move #[allow(unreachable_code)] in tests/run-pass/generator.rs 2021-08-26 16:16:43 +08:00
hyd-dev 33a67c6b33 Add #[allow(unreachable_code)] to drop(x) in tests/run-pass/generator.rs 2021-08-24 18:50:41 +08:00
niluxv 083e5e604c Add test for volatile_set_memory 2021-08-23 12:42:13 +02:00
Ralf Jung 9a6a5119fc rustup 2021-08-16 17:09:21 +02:00
hyd-dev 838ed1d754 Update tests for #[no_mangle] associated functions 2021-08-15 17:21:33 +08:00
Ralf Jung 78b4c7bf79 rustup 2021-08-14 14:47:57 +02:00
hyd-dev af7eb369b1 Fix tests for C-unwind ABI changes 2021-08-07 15:57:54 +08:00
Ralf Jung 5338a16018 adjust for ERR_ON_PARTIAL_PTR_OVERWRITE 2021-08-02 17:58:55 +02:00
bors 02f78b089c Auto merge of #1858 - RalfJung:thread-leaks, r=oli-obk
also ignore 'thread leaks' with -Zmiri-ignore-leaks

This is a step towards https://github.com/rust-lang/miri/issues/1371. The remaining hard part would be supporting checking for memory leaks when there are threads still running. For now we elegantly avoid this problem by using the same flag to control both of these checks. :)
2021-07-27 12:23:56 +00:00
Ralf Jung 78bcd12b17 make sure we only terminate main thread once TLS is initialized 2021-07-27 14:05:37 +02:00
Ralf Jung 66aa3d0247 make the loop infinite 2021-07-27 13:58:55 +02:00