-
Notifications
You must be signed in to change notification settings - Fork 353
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
running miri on rustc's test suite (run-pass) #55
Comments
I have implementations for I'll submit them soon and see how the test results change. |
I implemented the missing non |
These are used when working with ffi... Should we support these cases? |
to pass more tests we need to implement panic and print, some minor bugs are left, but these make up most of our failed tests. |
@oli-obk Any chance you could gist the entire test output? Assuming it contains both names and messages, it would let people like me to idly rummage through some of the maybe-UB tests. |
see in first post for frequently updating file |
https://github.com/rust-lang/rust/blob/master/src/test/run-pass/mir_raw_fat_ptr.rs#L129 compares pointers into different allocs ( same in raw_fat_ptr.rs and mir_raw_fat_ptr.rs) |
I believe we could impose an ordering between unrelated allocations, but it wouldn't really be based on anything (it would just have to be deterministic). I've seen a C interpreter that essentially has an arbitrary deterministic ordering, if I recall correctly. |
@solson Not in CTFE mode, though, right? |
@eddyb No, even in CTFE mode, if we can guarantee determinism. |
That's gonna expose some internals and differ depending on the mir optimizations that are run before evaluation. |
@solson If that determinism depends on the order things were evaluated in, that's not deterministic enough. It should be impossible for constant evaluation to observe any past interactions. |
It doesn't really expose anything. It's fine if it differs, so long as it runs the same given the same inputs (sources, flags, etc). |
@eddyb Yeah, it wouldn't work if you re-use the same uncleared |
I agree it sounds too risky for CTFE now. |
Nope, that's not enough, the "inputs" are the MIR to evaluate and its generic parameters, not the whole compilation. I've described how getting this wrong even one bit can impact coherence and thus soundness. |
I updated the top post with a list of the missing MIRs and a list of all panics happening inside miri. I also attached an updated raw output file. |
@oli-obk Can you re-run and update the OP? I was having some odd problems running it, but I can investigate stuff based on your results for now. |
sure |
I think I broke it in 8b8c743 fixed it, report and PR coming in around an hour. |
updated log |
There are a number of "invalid enum discriminant value read" results in your log that I can't reproduce. When I run those tests, they succeed. |
our rustc versions and/or test suite may differ due to different checkouts. My checkout is from February 2nd. My rustc is rustc 1.16.0-nightly (24055d0f2 2017-01-31) |
rustc 1.17.0-nightly (ea7a6486a 2017-02-04) with the latest checkout here. Maybe your packed struct PR a few days ago fixed things? |
I'll investigate |
ok, so updating rustc and the checkout fixed these bugs, so it must be something rustc changed that fixed it and not us, because I used the same miri code base. Regenerating log... |
updated log. |
every
some of these are useless... like a test testing rerunning after |
Is there a plan for supporting inline assembly? |
@gnzlbg No. |
So there will never be a way to work around that? |
If rust code could detect that is being run at compile-time, and branch on it, it could provide a different implementation of some functionality without features that miri will probably never understand (like inline assembly, SIMD intrinsics, llvm intrinsics, etc). |
@gnzlbg Yeah, I refer to that idea as |
Cool! Something like |
@oli-obk It'd be nice to split the "error" count in the OP into true errors and "unsupported", so things like lack of threading don't inflate the error count. I'd also prefer to have them in separate lists if possible. |
|
Good point, it wouldn't actually use |
fun fact: over the last month miri has gotten faster by a factor of two. At least the rustc test suite is finished twice as fast (number of tests went up! not down). This might either be due to improvements in rustc or due to improvements in miri. |
I'm running this now with full std mir enabled. We seem to have some previously unknown issues. But at least "no mir" errors have gone down to 2. |
@oli-obk If you look at your 2 "MIR not found" errors, I'm pretty sure the |
Is there any way to run miri on the tests ( |
hmm... I think I implemented this in |
output of
1617 success, 558 no mir, 205 crate not found, 158 failed1630 success, 560 no mir, 205 crate not found, 143 failed1632 success, 561 no mir, 205 crate not found, 140 failed1632 success, 562 no mir, 205 crate not found, 139 failed1633 success, 563 no mir, 205 crate not found, 137 failed1638 success, 554 no mir, 205 crate not found, 141 failed1864 success, 211 no mir, 205 crate not found, 258 failed1867 success, 202 no mir, 205 crate not found, 264 failed1868 success, 202 no mir, 205 crate not found, 94 failed, 43 C fn, 9 ABI, 102 unsupported, 5 intrinsic1878 success, 201 no mir, 205 crate not found, 58 failed, 42 C fn, 9 ABI, 121 unsupported, 5 intrinsic1883 success, 201 no mir, 205 crate not found, 55 failed, 42 C fn, 9 ABI, 121 unsupported, 6 intrinsic1885 success, 201 no mir, 205 crate not found, 53 failed, 42 C fn, 9 ABI, 121 unsupported, 6 intrinsic1886 success, 201 no mir, 205 crate not found, 52 failed, 42 C fn, 9 ABI, 121 unsupported, 6 intrinsic1902 success, 202 no mir, 206 crate not found, 60 failed, 44 C fn, 0 ABI, 122 unsupported, 6 intrinsic1901 success, 202 no mir, 206 crate not found, 54 failed, 44 C fn, 9 ABI, 122 unsupported, 6 intrinsic1904 success, 202 no mir, 206 crate not found, 49 failed, 44 C fn, 9 ABI, 122 unsupported, 6 intrinsic1905 success, 202 no mir, 206 crate not found, 52 failed, 44 C fn, 9 ABI, 122 unsupported, 2 intrinsic1907 success, 202 no mir, 206 crate not found, 52 failed, 44 C fn, 9 ABI, 122 unsupported, 0 intrinsic1913 success, 202 no mir, 206 crate not found, 50 failed, 44 C fn, 9 ABI, 122 unsupported, 0 intrinsic1933 success, 201 no mir, 209 crate not found, 49 failed, 38 C fn, 0 ABI, 122 unsupported, 6 intrinsic1985 success, 206 no mir, 219 crate not found, 62 failed, 40 C fn, 0 ABI, 122 unsupported, 6 intrinsic2016 success, 208 no mir, 225 crate not found, 57 failed, 34 C fn, 0 ABI, 123 unsupported, 10 intrinsic2022 success, 208 no mir, 225 crate not found, 51 failed, 34 C fn, 0 ABI, 123 unsupported, 10 intrinsic2025 success, 208 no mir, 225 crate not found, 48 failed, 34 C fn, 0 ABI, 123 unsupported, 10 intrinsic2179 success, 2 no mir, 235 crate not found, 68 failed, 145 C fn, 0 ABI, 15 unsupported, 6 intrinsic2179 success, 3 no mir, 235 crate not found, 73 failed, 42 C fn, 0 ABI, 112 unsupported, 6 intrinsic2188 success, 14 no mir, 236 crate not found, 79 failed, 44 C fn, 0 ABI, 113 unsupported, 6 intrinsic2457 success, 5 no mir, 252 crate not found, 100 failed, 44 C fn, 0 ABI, 118 unsupported, 14 intrinsic
Tracking the state in gist from now on, so we can see diffs
https://gist.github.com/oli-obk/5a0832eef3124ad9088748fc9e759318
The text was updated successfully, but these errors were encountered: