1
Fork 0

Additional sanity assertion

This commit is contained in:
Oliver Schneider 2018-01-22 10:21:49 +01:00
parent 9d9a69d7fa
commit 4caf6a92f3
No known key found for this signature in database
GPG key ID: A69F8D225B3AD7D9

View file

@ -518,7 +518,7 @@ impl<'a, 'mir, 'tcx, M: Machine<'mir, 'tcx>> Memory<'a, 'mir, 'tcx, M> {
) -> EvalResult<'tcx> {
match self.alloc_kind.get(&alloc) {
// do not go into statics
None => Ok(()),
None => Ok(()),
// just locals and machine allocs
Some(_) => self.mark_static_initialized(alloc, mutability),
}
@ -555,6 +555,8 @@ impl<'a, 'mir, 'tcx, M: Machine<'mir, 'tcx>> Memory<'a, 'mir, 'tcx, M> {
for &alloc in alloc.relocations.values() {
self.mark_inner_allocation_initialized(alloc, mutability)?;
}
} else {
bug!("no allocation found for {:?}", alloc_id);
}
Ok(())
}