Commit Graph

910 Commits

Author SHA1 Message Date
Ralf Jung
e9b140b4a5 update fn ptr tests 2022-02-25 12:06:10 -05:00
Ralf Jung
444396d620 rustup 2022-02-24 10:55:40 -05:00
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](b815532674/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
d8f7b831e7 add regression test 2021-12-15 19:11:08 +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
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
b3be6b44b6 Add tests for -Zmiri-check-number-validity 2021-11-10 11:36:42 -08: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
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
hyd-dev
838ed1d754
Update tests for #[no_mangle] associated functions 2021-08-15 17:21:33 +08:00
hyd-dev
af7eb369b1
Fix tests for C-unwind ABI changes 2021-08-07 15:57:54 +08: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
Ralf Jung
679d10f98b no concurrency on windows 2021-07-25 14:38:02 +02:00
Ralf Jung
71efd950d1 also ignore 'thread leaks' with -Zmiri-ignore-leaks 2021-07-25 14:21:06 +02:00
Smit Soni
da6880427a Update error code for fs ops in isolation
Change the code to either `EACCES` (if the op is performed on the
path), or `EBADF` (if the op is performed the fd)

Updated ops: `stat`, `opendir`, `ftruncate64`, and `readlink`

Add a new test for fs ops in isolation.
2021-07-20 08:23:51 -07:00
Ralf Jung
6ce77164c1 rustup 2021-07-20 12:18:59 +02:00
Ralf Jung
bf8b2aa8dc add test for better ptr handling in enum niches 2021-07-17 13:59:58 +02:00
Aaron Hill
811423e761
Rustup for #[track_caller] trait object changes
Change test to assert that we get the correct location
even through a trait object call.
2021-07-10 11:51:00 -05:00
Ralf Jung
833dff994f rustup 2021-07-07 09:33:01 +02:00