diff options
| author | Ralf Jung <post@ralfj.de> | 2018-10-11 13:13:14 +0200 |
|---|---|---|
| committer | Ralf Jung <post@ralfj.de> | 2018-10-13 09:09:03 +0200 |
| commit | b2ddd27c2e9de8e7ad75c1f7a276aff22d8a2c52 (patch) | |
| tree | 6df38ade68c114ef92ccaf91e7a79dd0b20190aa /src | |
| parent | dc4b2771f828103624a3109f38bd0ca1a9e924f8 (diff) | |
| download | rust-b2ddd27c2e9de8e7ad75c1f7a276aff22d8a2c52.tar.gz rust-b2ddd27c2e9de8e7ad75c1f7a276aff22d8a2c52.zip | |
address nits
Diffstat (limited to 'src')
| -rw-r--r-- | src/librustc_mir/interpret/memory.rs | 1 | ||||
| -rw-r--r-- | src/librustc_mir/interpret/validity.rs | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/src/librustc_mir/interpret/memory.rs b/src/librustc_mir/interpret/memory.rs index 781673a9914..222bef4ff13 100644 --- a/src/librustc_mir/interpret/memory.rs +++ b/src/librustc_mir/interpret/memory.rs @@ -855,6 +855,7 @@ impl<'a, 'mir, 'tcx, M: Machine<'a, 'mir, 'tcx>> Memory<'a, 'mir, 'tcx, M> { return Ok(()); } let ptr = ptr.to_ptr()?; + // Check bounds, align and relocations on the edges self.get_bytes_with_undef_and_ptr(ptr, size, align)?; // Check undef, and maybe ptr self.check_defined(ptr, size)?; diff --git a/src/librustc_mir/interpret/validity.rs b/src/librustc_mir/interpret/validity.rs index 2c5a3a18128..aadb5cc871e 100644 --- a/src/librustc_mir/interpret/validity.rs +++ b/src/librustc_mir/interpret/validity.rs @@ -511,7 +511,7 @@ impl<'a, 'mir, 'tcx, M: Machine<'a, 'mir, 'tcx>> EvalContext<'a, 'mir, 'tcx, M> // This is the size in bytes of the whole array. let size = Size::from_bytes(ty_size * len); - // In run-time mode, we accept points in here. This is actually more + // In run-time mode, we accept pointers in here. This is actually more // permissive than a per-element check would be, e.g. we accept // an &[u8] that contains a pointer even though bytewise checking would // reject it. However, that's good: We don't inherently want |
