Additional sanity assertion
This commit is contained in:
parent
9d9a69d7fa
commit
4caf6a92f3
1 changed files with 3 additions and 1 deletions
|
@ -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(())
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue