]> git.lizzy.rs Git - rust.git/commit - src/tools/miri
Auto merge of #99033 - 5225225:interpreter-validity-checks, r=oli-obk
authorbors <bors@rust-lang.org>
Sun, 17 Jul 2022 19:28:01 +0000 (19:28 +0000)
committerbors <bors@rust-lang.org>
Sun, 17 Jul 2022 19:28:01 +0000 (19:28 +0000)
commit263edd43c5255084292329423c61a9d69715ebfa
treeda4b05f8e9170da406ef68de2a281e7060eb07fc
parentc2ecd3af87477147695aa3f6e1237e3185044e62
parent27412d1e3e128349bc515c16ce882860e20f037d
Auto merge of #99033 - 5225225:interpreter-validity-checks, r=oli-obk

Use constant eval to do strict mem::uninit/zeroed validity checks

I'm not sure about the code organisation here, I just dumped the check in rustc_const_eval at the root. Not hard to move it elsewhere, in any case.

Also, this means cranelift codegen intrinsics lose the strict checks, since they don't seem to depend on rustc_const_eval, and I didn't see a point in keeping around two copies.

I also left comments in the is_zero_valid methods about "uhhh help how do i do this", those apply to both methods equally.

Also rustc_codegen_ssa now depends on rustc_const_eval... is this okay?

Pinging `@RalfJung` since you were the one who mentioned this to me, so I'm assuming you're interested.

Haven't had a chance to run full tests on this since it's really warm, and it's 1AM, I'll check out any failures/comments in the morning :)
Cargo.lock
compiler/rustc_const_eval/src/interpret/intrinsics.rs
compiler/rustc_const_eval/src/lib.rs