1
Fork 0

interpret: do not call machine read hooks during validation

This commit is contained in:
Ralf Jung 2024-03-09 19:13:18 +01:00
parent b054da8155
commit bf47df8b0b
6 changed files with 107 additions and 12 deletions

View file

@ -967,7 +967,7 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
let mut visitor = ValidityVisitor { path, ref_tracking, ctfe_mode, ecx: self };
// Run it.
match visitor.visit_value(op) {
match self.run_for_validation(|| visitor.visit_value(op)) {
Ok(()) => Ok(()),
// Pass through validation failures and "invalid program" issues.
Err(err)