interpret: add a version of run_for_validation for &self

This commit is contained in:
Ralf Jung
2025-04-01 15:11:10 +02:00
parent ed201574c5
commit e638ba69f0
3 changed files with 34 additions and 13 deletions

View File

@@ -1322,7 +1322,7 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> {
trace!("validate_operand_internal: {:?}, {:?}", *val, val.layout.ty);
// Run the visitor.
self.run_for_validation(|ecx| {
self.run_for_validation_mut(|ecx| {
let reset_padding = reset_provenance_and_padding && {
// Check if `val` is actually stored in memory. If not, padding is not even
// represented and we need not reset it.