]> git.lizzy.rs Git - rust.git/commitdiff
Auto merge of #1022 - christianpoveda:fix-fd-access, r=RalfJung
authorbors <bors@rust-lang.org>
Wed, 13 Nov 2019 22:58:24 +0000 (22:58 +0000)
committerbors <bors@rust-lang.org>
Wed, 13 Nov 2019 22:58:24 +0000 (22:58 +0000)
Fix unchecked memory access for files

This PR takes care of two problems:

- It uses `Memory::(read|write)_bytes` to guarantee that memory accesses are checked (Fixes: https://github.com/rust-lang/miri/issues/1007)
- It removes the `(get|remove)_handle_and` methods which were a little bit cumbersome to use. In particular `remove_handle_and`, because we were using it to avoid borrowing issues before the `Evaluator::memory` field was public.

@RalfJung @oli-obk


Trivial merge