]> git.lizzy.rs Git - rust.git/commit
Auto merge of #54762 - RalfJung:miri-validate, r=oli-obk
authorbors <bors@rust-lang.org>
Tue, 9 Oct 2018 17:19:56 +0000 (17:19 +0000)
committerbors <bors@rust-lang.org>
Tue, 9 Oct 2018 17:19:56 +0000 (17:19 +0000)
commit0e07c4281c343e9e15a0a8fca79538ad1a8eb513
treea85d262a0e07a888acd31611f18884a750ef90b9
parente1643a8968753226dab7ab3c9fee826f097550f2
parentfe96f8235ca4929652950d62341d3de83527de71
Auto merge of #54762 - RalfJung:miri-validate, r=oli-obk

Prepare miri engine for enforcing validity invariant during execution

In particular, make recursive checking of references optional, and add a `const_mode` parameter that says whether `usize` is allowed to contain a pointer. Also refactor validation a bit to be type-driven at the "leafs" (primitive types), and separately validate scalar layout to catch `NonNull` violations (which it did not properly validate before).

Fixes https://github.com/rust-lang/rust/issues/53826
Also fixes https://github.com/rust-lang/rust/issues/54751

r? @oli-obk