Skip to content

update Miri #103392

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 67 commits into from
Oct 25, 2022
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
33bdddb
remove FFI support for macOS
RalfJung Oct 7, 2022
ce4620b
Auto merge of #2586 - RalfJung:ffi, r=RalfJung
bors Oct 7, 2022
c2adc2e
rustup
RalfJung Oct 7, 2022
58b13b7
clippy learned some new tricks
RalfJung Oct 7, 2022
5243ae9
bless cargo-miri output
RalfJung Oct 8, 2022
7b30b26
Auto merge of #2583 - RalfJung:rustup, r=oli-obk
bors Oct 8, 2022
000e946
add josh instructions
RalfJung Oct 8, 2022
10ef1cb
Auto merge of #2587 - RalfJung:josh, r=RalfJung
bors Oct 9, 2022
e413c96
merge rustc history
RalfJung Oct 9, 2022
8b1caaa
rustup
RalfJung Oct 9, 2022
eb29c9e
cargo got fixed, re-bless its tests
RalfJung Oct 9, 2022
ccbc63b
1/1000 events do happen sometimes...
RalfJung Oct 9, 2022
3bcd276
Auto merge of #2590 - RalfJung:rustup, r=RalfJung
bors Oct 9, 2022
92b702e
merge rustc history
RalfJung Oct 10, 2022
1f123d7
rustup
RalfJung Oct 10, 2022
e7785f6
Auto merge of #2591 - RalfJung:rustup, r=RalfJung
bors Oct 10, 2022
96737e3
merge rustc history
RalfJung Oct 12, 2022
e67e01b
rustup
RalfJung Oct 12, 2022
d8761c0
Auto merge of #2592 - RalfJung:rustup, r=RalfJung
bors Oct 12, 2022
a1bc9ad
CI improvements
RalfJung Oct 14, 2022
3e5ffd8
Auto merge of #2593 - RalfJung:ci, r=RalfJung
bors Oct 14, 2022
4dc7532
print the target also when running tests on the host
RalfJung Oct 14, 2022
afca9dc
Auto merge of #2594 - RalfJung:target, r=RalfJung
bors Oct 14, 2022
79cd6f3
Implement a crude stack printing mechanism
saethlin Jul 4, 2022
26186d7
Add a test
saethlin Oct 15, 2022
d287a0b
Replace tags in stdout
saethlin Oct 15, 2022
f8832a4
fix caching check in CI
RalfJung Oct 16, 2022
1c294d1
Auto merge of #2596 - RalfJung:ci, r=RalfJung
bors Oct 16, 2022
2420d53
Add docs
saethlin Oct 18, 2022
314ff05
Auto merge of #2322 - saethlin:stack-inspection-tools, r=oli-obk
bors Oct 19, 2022
804cf26
use Scalar return types for Windows shims
RalfJung Oct 19, 2022
4207f9e
Auto merge of #2604 - RalfJung:ret-scalar, r=RalfJung
bors Oct 19, 2022
e7faf04
Never start the Stack::retain loop at offset 0 so that the left eleme…
saethlin Oct 18, 2022
43de83e
Auto merge of #2600 - saethlin:ice, r=RalfJung
bors Oct 19, 2022
845662e
Magic functions for writing to stdout/stderr.
cbiffle Oct 19, 2022
4dcf51b
Auto merge of #2606 - cbiffle:nostdio, r=RalfJung
bors Oct 20, 2022
3244c11
add windows one time initialization
beepster4096 Oct 18, 2022
342251c
add test for init once
beepster4096 Oct 18, 2022
22d06f9
update rust version
beepster4096 Oct 18, 2022
7ca6b17
use Default derive for InitOnceStatus
beepster4096 Oct 19, 2022
7cf32a7
code reuse for sync ids
beepster4096 Oct 19, 2022
b649b96
remove redundant Ok(...?)
beepster4096 Oct 19, 2022
7e56e77
change rust version to fix CI
beepster4096 Oct 20, 2022
a39629b
slight refactoring
RalfJung Oct 20, 2022
53e3577
Auto merge of #2601 - DrMeepster:windows_init_once, r=RalfJung
bors Oct 20, 2022
9b57a2f
merge rustc history
RalfJung Oct 21, 2022
76c554e
rustup
RalfJung Oct 21, 2022
bb911ce
add always-failing GetFileInformationByHandleEx stub
RalfJung Oct 21, 2022
befc94e
Auto merge of #2607 - RalfJung:rustup, r=RalfJung
bors Oct 21, 2022
9a1edc3
use is_terminal to implement isatty
RalfJung Oct 21, 2022
7300aac
split libc tests from stdlib tests
RalfJung Oct 21, 2022
1c9f368
test is_terminal
RalfJung Oct 21, 2022
9670a30
Auto merge of #2609 - RalfJung:is_terminal, r=RalfJung
bors Oct 21, 2022
f554ebb
add test for #1909
RalfJung Oct 21, 2022
233542b
Auto merge of #2610 - RalfJung:issue-1909, r=RalfJung
bors Oct 21, 2022
b42721c
Update libffi-sys to 2.0.1
pfmooney Oct 20, 2022
6504d2e
Auto merge of #2611 - pfmooney:libffi, r=RalfJung
bors Oct 21, 2022
590834b
add GetFileType stub
ChrisDenton Oct 21, 2022
fc3bcac
Auto merge of #2612 - ChrisDenton:getfiletype, r=RalfJung
bors Oct 21, 2022
44808ed
add scalar-abi-only field retagging option
RalfJung Oct 22, 2022
b3d53ec
Auto merge of #2613 - RalfJung:scalar-only-field-retagging, r=RalfJung
bors Oct 23, 2022
0d0a603
point to my fork of josh for now
RalfJung Oct 24, 2022
71e81ab
Auto merge of #2615 - RalfJung:josh, r=oli-obk
bors Oct 24, 2022
64f56d2
update lockfile
RalfJung Oct 22, 2022
a61737e
add support for testing Miri on other targets, and do some cross-test…
RalfJung Oct 22, 2022
84e6732
also smoke-test 'cargo miri test'
RalfJung Oct 22, 2022
a157e0e
Miri: disable macOS testing for now
RalfJung Oct 25, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/tools/miri/rust-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
e42c4d7218b2596276152c5eb1e69335621f3086
f382c2748aec2ada91eff88840c996644ff0f70d
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out


running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 2 filtered out
Expand Down
10 changes: 5 additions & 5 deletions src/tools/miri/test-cargo-miri/test.filter.stdout.ref
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out


running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 2 filtered out
Expand All @@ -15,3 +10,8 @@ test simple ... ok

test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 5 filtered out


running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 4 filtered out; finished in $TIME

1 change: 0 additions & 1 deletion src/tools/miri/tests/fail/erroneous_const.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// Inlining changes the error location
//@compile-flags: -Zmir-opt-level=0
#![feature(never_type)]
#![warn(warnings, const_err)]

struct PrintName<T>(T);
impl<T> PrintName<T> {
Expand Down
8 changes: 2 additions & 6 deletions src/tools/miri/tests/fail/erroneous_const2.rs
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
const X: u32 = 5;
const Y: u32 = 6;
const FOO: u32 = [X - Y, Y - X][(X < Y) as usize];
//~^ERROR: any use of this value
//~|WARN: previously accepted
//~^ERROR: evaluation of constant value failed

#[rustfmt::skip] // rustfmt bug: https://github.com/rust-lang/rustfmt/issues/5391
fn main() {
println!("{}", FOO); //~ERROR: post-monomorphization error
//~|ERROR: evaluation of constant value failed
//~|ERROR: erroneous constant used
//~|WARN: previously accepted
println!("{}", FOO);
}
36 changes: 3 additions & 33 deletions src/tools/miri/tests/fail/erroneous_const2.stderr
Original file line number Diff line number Diff line change
@@ -1,39 +1,9 @@
error: any use of this value will cause an error
--> $DIR/erroneous_const2.rs:LL:CC
|
LL | const FOO: u32 = [X - Y, Y - X][(X < Y) as usize];
| -------------- ^^^^^ attempt to compute `5_u32 - 6_u32`, which would overflow
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
= note: `#[deny(const_err)]` on by default

error[E0080]: evaluation of constant value failed
--> $DIR/erroneous_const2.rs:LL:CC
|
LL | println!("{}", FOO);
| ^^^ referenced constant has errors

error: erroneous constant used
--> $DIR/erroneous_const2.rs:LL:CC
|
LL | println!("{}", FOO);
| ^^^ referenced constant has errors
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
= note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info)

error: post-monomorphization error: referenced constant has errors
--> $DIR/erroneous_const2.rs:LL:CC
|
LL | println!("{}", FOO);
| ^^^ referenced constant has errors
|
= note: inside `main` at $DIR/erroneous_const2.rs:LL:CC

note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace
LL | const FOO: u32 = [X - Y, Y - X][(X < Y) as usize];
| ^^^^^ attempt to compute `5_u32 - 6_u32`, which would overflow

error: aborting due to 4 previous errors
error: aborting due to previous error

For more information about this error, try `rustc --explain E0080`.
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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]; // Make it big enough so we don't get an out-of-bounds error.
let x = &x[0] as *const _ as *const u32;
// This must fail because alignment is violated: the allocation's base is not sufficiently aligned.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use std::ptr;

fn main() {
// Try many times as this might work by chance.
for _ in 0..10 {
for _ in 0..20 {
let x = [2u16, 3, 4]; // Make it big enough so we don't get an out-of-bounds error.
let x = &x[0] as *const _ as *const u32;
// This must fail because alignment is violated: the allocation's base is not sufficiently aligned.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion src/tools/miri/tests/pass/align.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down