-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Validate miri against the HIR const evaluator #45002
Merged
Merged
Changes from 250 commits
Commits
Show all changes
1591 commits
Select commit
Hold shift + click to select a range
7c6befe
Merge pull request #274 from RalfJung/packed2
oli-obk 69fd22f
fix for latest nightly
RalfJung 6d3c88c
Merge pull request #277 from RalfJung/nightly
RalfJung 11e30a6
Split up miri into the librustc_mir and bin parts
oli-obk 36502a3
Implement the first machine function
oli-obk dc6e877
Split "new" miri crate into modules
oli-obk 4a4640a
Move more non-CTFE operations to the Machine
oli-obk 960dca1
Rename `const_eval::Evaluator` to `CompileTimeFunctionEvaluator`
oli-obk 728bb87
Move the `global_item` function to the `EvalContext`
oli-obk e5799a6
Reduce the chance of accidentally calling functions in CTFE
oli-obk e15d374
Fix doc text
oli-obk df7c42b
Move a method used everywhere out of `intrinsic.rs`
oli-obk 45b7cfd
Update env_logger in order to share more dependencies
oli-obk f16b9e2
Move all intrinsics out of `interpret` and fail CTFE on intrinsic calls
oli-obk 4383fc2
Adjust travis to the directory changes
oli-obk 7ed706d
Update Cargo.toml
oli-obk adfea61
Allow machines to create new memory kinds
oli-obk 23d351d
Move tls code to its own file
oli-obk 54ecdf1
Remove leftover unused file
oli-obk 3d82b66
Remove redundant `members` field
oli-obk 8de8580
Properly process ptr_op for const eval
oli-obk d05784f
Address comments
oli-obk 8b81f54
Fix running the rustc test suite
oli-obk 393216d
Add a better error message than `syscall 318 not found`
oli-obk 79f38bf
Process untagged unions
oli-obk f19d77e
Build the rustc_tests binary on travis
oli-obk 7700bd0
Merge pull request #268 from oli-obk/upstream
oli-obk f8c61da
Add a test for untagged unions
oli-obk cf318b1
Merge pull request #278 from solson/unions
eddyb 29a3c4d
Produce backtraces for miri internals
oli-obk 7e585ef
Speed up travis by using release mode
oli-obk 40677a5
Choose release miri for release tests
oli-obk 8deb938
step.rs: improve comment for clarity
RalfJung c533cf8
fix size_of_val on unsized tuples
RalfJung 163821b
Remove accidental text paste
oli-obk f7bc6ab
Reuse the `Backtrace` object instead of rolling our own
oli-obk 5d27b94
fix comment
RalfJung de1376f
Add a build script to inform the binary about its profile, and use th…
RalfJung 5aed318
Merge pull request #281 from RalfJung/unsized
RalfJung 0f43321
no need to do run-time formatting
RalfJung 2cf3949
actually, we can use a plain constant
RalfJung 726b027
Merge pull request #280 from solson/archeology
oli-obk dd533a9
Revert "disable validation code so that it all compiles against curre…
RalfJung b3fa42f
with Validation MIR around drop being fixed, we can remove the hack w…
RalfJung c2c0501
with the new 'limited validation when there is unsafe', we can signif…
RalfJung 85dc3e5
make execution with full MIR work: need to whitelist Arc drop impl an…
RalfJung 3754572
Release of an Undef local is fine, and a NOP
RalfJung 766a69f
make test suite MIR validation aware. run-pass passes with and withou…
RalfJung 58a1702
Let -Zmir-emit-validate also control whether miri even acts on the va…
RalfJung 9458111
for now, disable validation on optimized tests -- inlining breaks val…
RalfJung 4957031
selectively disable validation in compile-fail where appropriate. car…
RalfJung 181bb30
Rustc reorders fields, but miri expects them in source order
oli-obk 8b449c3
Merge pull request #284 from oli-obk/no_more_llvm_madness
oli-obk ac49e7c
only collect backtrace when RUST_BACKTRACE is set; resolve symbols la…
RalfJung fb2ed45
consolidate making Undef release a NOP in one place
RalfJung 2a1d766
Merge pull request #286 from RalfJung/mir-validate
RalfJung b59c092
Merge pull request #283 from RalfJung/backtrace
oli-obk e7d8037
Rustup
oli-obk a98a68b
Merge pull request #289 from RalfJung/rusutp
RalfJung 847396e
Re-do memory locking (again). Now with proper support for multiple i…
RalfJung 547f49c
Merge pull request #288 from RalfJung/mir-validate
oli-obk d0ac2b1
make xargo/build.sh more cross-platform
RalfJung 14e8f50
Merge pull request #291 from RalfJung/cross-platform
RalfJung 4ba2b82
Split the alloc id address space into functions and normal allocs
oli-obk 181851f
Always allocate for globals
oli-obk 8ab1eee
Implement packed statics
oli-obk 3ce57d1
Remove unused function
oli-obk 897b563
clarify which function is pushing a global
oli-obk 9e787fb
Dump all allocs when dumping locals
oli-obk bba753d
c_int != usize
oli-obk 81f5de7
rename `memory::Kind` to `memory::MemoryKind`
oli-obk 91db25b
Rename `destructure` method to `into_alloc_id_kind`
oli-obk a6096fb
Merge pull request #292 from oli-obk/static_alloc_ids
oli-obk 7e6c497
Make cargo_miri a feature
oli-obk 4ce60ab
Update build.rs
oli-obk e2de0b2
Merge pull request #294 from oli-obk/cargo_miri
RalfJung e71af86
Merge branch 'master' into oli-obk-patch-2
oli-obk 65a3131
Merge pull request #295 from solson/oli-obk-patch-2
RalfJung de80bcb
some tests for RangeMap
RalfJung 11f0aed
add some tests making sure we get the alias checking right
RalfJung 668491a
Work on making validation test pass again
RalfJung bff1ad1
integer-ops needs a rustc patch to work again
RalfJung 7b5f8a3
try harder to preserve regions when doing inference
RalfJung 5e018b1
analyzing hashmap.rs uncovered a deeper problem; disable validation t…
RalfJung 3468504
add a bunch of compile-fail tests for validation
RalfJung 8e8c9c8
turns out we can enable this sanity check now
RalfJung 85fd3f8
Merge pull request #297 from RalfJung/mir-validate
oli-obk 1326aed
rustfmt
RalfJung 63c4843
Merge pull request #299 from RalfJung/rustfmt
oli-obk 33ff32c
Get the test suite working inside the rustc test suite
oli-obk 8019deb
Update compiletest.rs
oli-obk dca1be6
Merge pull request #300 from oli-obk/rustc_tests
oli-obk 2be159b
enable a test that waited for a rustc fix
RalfJung 7e5d971
fix warnings; make test suite pass again
RalfJung 5d60c61
Merge pull request #302 from RalfJung/mir-validate2
RalfJung 90edc03
Add a test demonstrating the limitations of our lfietime resolution
RalfJung 2fccae8
add another compile-fail test for validation
RalfJung 1f20b7d
travis: fail fast
RalfJung 4cfda6a
hack to make xargo libstd build work again
RalfJung 7b8e2c7
Rustup (`Clone` is now a builtin trait)
oli-obk f75dd90
Also reuse function pointer shims and drop glue from rustc
oli-obk 66108be
Merge pull request #308 from oli-obk/libstd
RalfJung ae10b23
Merge branch 'master' into mir-validate
RalfJung 3f3fada
Merge pull request #301 from RalfJung/mir-validate
RalfJung e332ab9
Handle closures in get_field_ty
RalfJung 9ede346
Refactoring: Couple values and types into an object when passed aroun…
oli-obk f860ad8
Merge pull request #306 from RalfJung/closures
oli-obk 110d50e
Merge branch 'master' into libstd
oli-obk 1901885
Simplify dropping by reusing `eval_fn_call`
oli-obk 4e3c502
Merge pull request #309 from oli-obk/libstd
oli-obk fad1bc8
Merge branch 'master' into drop
oli-obk d38c328
Merge pull request #310 from oli-obk/drop
oli-obk 8539728
memory: make sure we check non-NULL/undef even fore 0-sized accesses
RalfJung f036fe0
refactor memory read API: provide only size-based, no type-based methods
RalfJung b1ca654
refactor memory write API to match read API
RalfJung ac80212
move tests with MIR-opt to their own function we we can run them sepa…
RalfJung 8ce6b06
Remove specialize float/bool read/write methods from memory
RalfJung 1ee718a
update compiletest. maybe that helps with the spurious failures.
RalfJung df20c06
use tempdir to create a dedicated directory for each test
RalfJung 2e28e14
reorder lets so that build_dir is deleted last
RalfJung 54a1f07
Merge pull request #312 from RalfJung/compiletest
RalfJung 2307d6f
Merge branch 'master' into memory
RalfJung 8b5f22c
use rustc version of fulfill_obligation now that we can
dwrensha b6d0597
Merge pull request #314 from dwrensha/fulfill-obligation
eddyb 3464401
Merge branch 'master' into memory
oli-obk 907d2c7
rustc #43457 got fixed, we can enable more tests
RalfJung 1fce886
Make some things public that are required by priroda
oli-obk 7355a1e
Remove some unused `extern crate`
oli-obk ac7dfca
Fix #313 by correctly copying relocations when doing overlapping copies
oli-obk e28f4a8
Add a regression test for #313
oli-obk 9d10e01
Mir validation can't cope with `mem::uninitialized::<SomeEnum>()`
oli-obk 02a0f0f
Turn off validation for some compile-fail tests
oli-obk e53e9b9
Deduplicate writing null case of struct wrapped nullable pointers
oli-obk b93462a
Merge pull request #315 from RalfJung/validation
oli-obk 385b5b9
Merge branch 'master' into priroda
oli-obk 129b914
`int_align` has no dynamic error case
oli-obk 2f0dcfb
Simplify `write_value_to_ptr`
oli-obk 44a360d
Merge pull request #316 from solson/priroda
oli-obk dd5b010
Merge remote-tracking branch 'origin/master' into memory
oli-obk f817f1c
Get rid of env var race condition once and for all
oli-obk 55eaf5e
Also update the rustc test suite runner
oli-obk b8329da
Merge pull request #311 from RalfJung/memory
oli-obk 206f0bd
Fix panic in subslice patterns of arrays (fixes #276)
oli-obk fb96a09
Merge pull request #318 from oli-obk/memory
oli-obk 88fc45b
Get some more rustc tests working
oli-obk 941fbf5
Merge pull request #319 from oli-obk/memory
oli-obk 506a5c7
Mir optimizations treat single variant enums as structs
oli-obk 446ed26
Add at least the program name argument in order to get rustc tests a …
oli-obk 33bfb64
Merge pull request #320 from oli-obk/memory
oli-obk e6a874b
test new From instances for Rc
RalfJung 4b67bfa
Merge pull request #322 from RalfJung/rc-tests
RalfJung 58a59e9
Rustup (generator support)
oli-obk 3243843
Merge pull request #323 from oli-obk/generators
oli-obk cf25ef9
Implement `align_offset` intrinsic and thus enabling `from_utf8`
oli-obk bb2bfb4
update for upstream rename: CodeExtent -> Scope
dwrensha ea911ca
disable validation in failing tests for now
RalfJung 10101dd
rename variables to match new type name
RalfJung 0002b5a
Merge pull request #328 from dwrensha/rustup
RalfJung 9a273e0
update backtrace to newly released version
RalfJung f1da208
also update rustc_test
RalfJung 41be917
make sure the lock file is not changed when building on CI
RalfJung ff75da2
Merge pull request #327 from RalfJung/backtrace
RalfJung df895cd
no reason not to run tests in miri (once someone writes them)
RalfJung 8dff161
update compiletest; we do not need tempdir any more
RalfJung 9386f05
Merge pull request #325 from RalfJung/test
RalfJung 3b6852a
Merge branch 'master' into align_offset
RalfJung ee5383f
Merge pull request #324 from oli-obk/align_offset
RalfJung e9315a6
Rustup
oli-obk 59cbfdb
enable a test that works just fine
RalfJung 2ee999b
use latest xargo; this fixes the libstd build problem
RalfJung 9fe0d60
disable optimized tests until rustc is fixed
RalfJung b456b7c
Merge pull request #330 from RalfJung/rustup
RalfJung 79f90d1
Make our build work just like the rustc build
oli-obk 5570a78
Disable validation for some tests
oli-obk 2c4fcd8
Merge pull request #329 from solson/oli-obk-patch-2
RalfJung bc2f925
rustup
oli-obk 1591977
clean up suspensions when function ends
RalfJung 00c909d
we can enable a bunch of tests for validation again
RalfJung 41f2288
fix warnings in tests; update validation whitelist
RalfJung a5fa8e9
only test on master
RalfJung ce48754
there are more tests we can enable again
RalfJung a1f71af
restrict cur_frame visibility
RalfJung 8307d27
Merge pull request #332 from solson/rustup
RalfJung ce3576f
Use correct rustc in rust's CI
oli-obk d5d3e3b
Merge pull request #333 from solson/rust_ci
eddyb 79993e6
rustup (part 1/2)
RalfJung c47ee6b
Rustup part 2/2
oli-obk 2cf984d
This is unreachable code and it should never ever be reachable even i…
oli-obk 02a943b
Merge pull request #335 from solson/rustup
RalfJung aa578de
identify write locks by lvalues, not regions
RalfJung bac89ae
enable validation for a bunch of more tests
RalfJung 59a329d
use catch expression to handle the 'release undef' problem slightly b…
RalfJung c163097
Disable the address-of-ZST test for now; it is buggy as it disagrees …
RalfJung 5d2ed4d
Something in panic handling fails validation with full-MIR
RalfJung 237590a
Merge pull request #336 from RalfJung/mir-validate
RalfJung a66f622
rustup
RalfJung 91d9b83
validation: remove a hack that is no longer necessary
RalfJung 24e45de
travis: more consistent cargo flags (--locked, --release)
RalfJung 7ec04cb
`cargo install` only takes `--debug`, not `--release`
oli-obk ca0f063
fix rustc_tests build
RalfJung 02e09dc
Merge pull request #337 from RalfJung/rustup
RalfJung 9db9308
Storage{Live,Dead} in generators got fixed
RalfJung e8ea7da
Merge pull request #339 from RalfJung/rustup
oli-obk 8cbfbf7
Remove `#[linkage(foo)]` statics from core miri
oli-obk f13455a
Merge pull request #340 from solson/babysteps
oli-obk ec5820c
Use rustc's APFloat impl instead of interpreter host floats
oli-obk 1fc3a00
Merge pull request #341 from solson/babysteps
oli-obk 2ea6663
validation: check that int, float etc. are not undef
RalfJung 8509dbb
validation: allow undef integers and raw pointers, as a crude work-ar…
RalfJung bc240ff
add an undef validation test
RalfJung 6d4840e
Merge pull request #342 from RalfJung/mir-validate
oli-obk 060bb2f
use ui test mode rather than mir-opt
RalfJung e7b0637
Merge branch 'master' into tests
RalfJung 605c82b
Merge pull request #343 from RalfJung/tests
RalfJung 5a5aa49
get rid of the --miri_host_target hack
RalfJung 8bddd6a
Merge pull request #344 from RalfJung/test
RalfJung cf92528
Add windows support
709ab24
Merge branch 'master' into windows
oli-obk 0320a77
Run appveyor tests in release mode
80853e2
Merge pull request #334 from solson/windows
oli-obk 8419abe
Only run appveyor on the master branch and on PRs
oli-obk b20c038
Merge pull request #346 from solson/oli-obk-patch-3
RalfJung bf890b9
README: show AppVeyor status
RalfJung 44fac71
fix AppVeyor URL
RalfJung 11e4859
Merge pull request #347 from RalfJung/readme
oli-obk 383153f
update compiletest
RalfJung 728e664
Merge pull request #348 from RalfJung/tests
oli-obk 1ad9709
get rid of ad-hoc inhabitedness test
RalfJung a5503a3
Merge pull request #350 from RalfJung/inhabited
eddyb a8980fd
use exchange_malloc lang item for Box statements
RalfJung 6e86503
fix oom2 test
RalfJung ed674f7
Merge pull request #351 from RalfJung/exchange_malloc
oli-obk f035b3d
Remove all non-CTFE stuff from the miri repository
oli-obk f835974
Move miri base code to rustc::mir::interpret
oli-obk df5e122
Merge remote-tracking branch 'miri/upstream' into miri
oli-obk ea35192
Adjust imports to librustc::mir::interpret
oli-obk d4c442d
Expose miri <-> ctfe differences
oli-obk acdf83f
Update miri to rustc changes
oli-obk fe58398
Merge remote-tracking branch 'origin/master' into miri
oli-obk 42a534c
miri: monomorphize types iff they came from MIR.
eddyb bf5ec79
miri: import ty::Ty directly.
eddyb ff6152c
miri: move param_env from Machine to EvalContext.
eddyb 9cb6499
miri: don't use an associated constant for a Machine's own data.
eddyb a792b6c
Merge remote-tracking branch 'origin/master' into miri
oli-obk 0f6b5b0
Update miri submodule
oli-obk 7e5583b
Merge remote-tracking branch 'origin/master' into miri
oli-obk 8c2ec68
Put miri const eval checking behind -Zmiri
oli-obk acac585
Move large chunks of miri from rustc::mir::interpret to rustc_mir::in…
oli-obk 1ba46dc
Move mir validation out of tree
oli-obk 7a2bff7
Do not produce debuginfo for tools
oli-obk File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
found the issue
(I think)