diff options
| author | Ralf Jung <post@ralfj.de> | 2022-10-09 13:40:49 +0200 |
|---|---|---|
| committer | Ralf Jung <post@ralfj.de> | 2022-10-09 13:41:39 +0200 |
| commit | ccbc63be5ef43a508f16bdbfcdbc71c15114ca8e (patch) | |
| tree | ebb88d42503b7af421253442005ed767446cb1ef | |
| parent | eb29c9e1303b3ce29bcaf908ccacfb7d9b6c5602 (diff) | |
| download | rust-ccbc63be5ef43a508f16bdbfcdbc71c15114ca8e.tar.gz rust-ccbc63be5ef43a508f16bdbfcdbc71c15114ca8e.zip | |
1/1000 events do happen sometimes...
6 files changed, 6 insertions, 6 deletions
diff --git a/src/tools/miri/tests/fail/unaligned_pointers/dyn_alignment.rs b/src/tools/miri/tests/fail/unaligned_pointers/dyn_alignment.rs index b943c7db7cc..ca8590cc6b3 100644 --- a/src/tools/miri/tests/fail/unaligned_pointers/dyn_alignment.rs +++ b/src/tools/miri/tests/fail/unaligned_pointers/dyn_alignment.rs @@ -7,7 +7,7 @@ struct MuchAlign; fn main() { // Try many times as this might work by chance. - for _ in 0..10 { + for _ in 0..20 { let buf = [0u32; 256]; // `buf` is sufficiently aligned for `layout.align` on a `dyn Debug`, but not // for the actual alignment required by `MuchAlign`. diff --git a/src/tools/miri/tests/fail/unaligned_pointers/reference_to_packed.rs b/src/tools/miri/tests/fail/unaligned_pointers/reference_to_packed.rs index 752210dca46..a807200771d 100644 --- a/src/tools/miri/tests/fail/unaligned_pointers/reference_to_packed.rs +++ b/src/tools/miri/tests/fail/unaligned_pointers/reference_to_packed.rs @@ -11,7 +11,7 @@ struct Foo { fn main() { // Try many times as this might work by chance. - for _ in 0..10 { + for _ in 0..20 { let foo = Foo { x: 42, y: 99 }; let p = &foo.x; let i = *p; //~ERROR: alignment 4 is required diff --git a/src/tools/miri/tests/fail/unaligned_pointers/unaligned_ptr3.rs b/src/tools/miri/tests/fail/unaligned_pointers/unaligned_ptr3.rs index 7605dd175a9..3aa8cb492a1 100644 --- a/src/tools/miri/tests/fail/unaligned_pointers/unaligned_ptr3.rs +++ b/src/tools/miri/tests/fail/unaligned_pointers/unaligned_ptr3.rs @@ -3,7 +3,7 @@ fn main() { // Try many times as this might work by chance. - for _ in 0..10 { + for _ in 0..20 { let x = [2u16, 3, 4, 5]; // Make it big enough so we don't get an out-of-bounds error. let x = &x[0] as *const _ as *const *const u8; // cast to ptr-to-ptr, so that we load a ptr // This must fail because alignment is violated. Test specifically for loading pointers, diff --git a/src/tools/miri/tests/fail/unaligned_pointers/unaligned_ptr4.rs b/src/tools/miri/tests/fail/unaligned_pointers/unaligned_ptr4.rs index 852febe4c04..606316120d6 100644 --- a/src/tools/miri/tests/fail/unaligned_pointers/unaligned_ptr4.rs +++ b/src/tools/miri/tests/fail/unaligned_pointers/unaligned_ptr4.rs @@ -6,7 +6,7 @@ fn main() { // (This would be missed if u8 allocations are *always* at odd addresses.) // // Try many times as this might work by chance. - for _ in 0..10 { + for _ in 0..20 { let x = [0u8; 4]; let ptr = x.as_ptr().wrapping_offset(1).cast::<u16>(); let _val = unsafe { *ptr }; //~ERROR: but alignment diff --git a/src/tools/miri/tests/fail/unaligned_pointers/unaligned_ptr_zst.rs b/src/tools/miri/tests/fail/unaligned_pointers/unaligned_ptr_zst.rs index 9076581b55b..eff42375956 100644 --- a/src/tools/miri/tests/fail/unaligned_pointers/unaligned_ptr_zst.rs +++ b/src/tools/miri/tests/fail/unaligned_pointers/unaligned_ptr_zst.rs @@ -4,7 +4,7 @@ fn main() { // Try many times as this might work by chance. - for i in 0..10 { + for i in 0..20 { let x = i as u8; let x = &x as *const _ as *const [u32; 0]; // This must fail because alignment is violated. Test specifically for loading ZST. diff --git a/src/tools/miri/tests/pass/align.rs b/src/tools/miri/tests/pass/align.rs index 997abd73392..2b6e83891d6 100644 --- a/src/tools/miri/tests/pass/align.rs +++ b/src/tools/miri/tests/pass/align.rs @@ -22,7 +22,7 @@ fn align_to() { fn main() { // Do this a couple times in a loop because it may work "by chance". - for _ in 0..10 { + for _ in 0..20 { manual_alignment(); align_to(); } |
