Skip to content

Commit 193cca2

Browse files
StrophoxRalfJung
andauthored
Change comment in compiler/rustc_middle/src/mir/interpret/allocation.rs
Co-authored-by: Ralf Jung <[email protected]>
1 parent f64d3c7 commit 193cca2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler/rustc_middle/src/mir/interpret/allocation.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -648,7 +648,7 @@ impl<Prov: Provenance, Extra, Bytes: AllocBytes> Allocation<Prov, Extra, Bytes>
648648
/// provenance in this allocation is exposed!
649649
pub fn prepare_for_native_call(&mut self) -> AllocResult {
650650
let full_range = AllocRange { start: Size::ZERO, size: Size::from_bytes(self.len()) };
651-
// Overwrite uninitialized bytes.
651+
// Overwrite uninitialized bytes with 0, to ensure we don't leak whatever their value happens to be.
652652
for chunk in self.init_mask.range_as_init_chunks(full_range) {
653653
if !chunk.is_init() {
654654
let uninit_bytes = &mut self.bytes

0 commit comments

Comments
 (0)