about summary refs log tree commit diff
path: root/compiler/rustc_const_eval/src/interpret/operand.rs
diff options
context:
space:
mode:
authorRalf Jung <post@ralfj.de>2024-08-31 17:03:03 +0200
committerRalf Jung <post@ralfj.de>2024-09-10 10:25:22 +0200
commita8889052261e23444cfde46b7aba16115625a7d6 (patch)
treea1574ec1d755df413ca16bc8e0a657835c041eef /compiler/rustc_const_eval/src/interpret/operand.rs
parent304b7f801bab31233680879ca4fb6eb294706a59 (diff)
downloadrust-a8889052261e23444cfde46b7aba16115625a7d6.tar.gz
rust-a8889052261e23444cfde46b7aba16115625a7d6.zip
miri: treat non-memory local variables properly for data race detection
Diffstat (limited to 'compiler/rustc_const_eval/src/interpret/operand.rs')
-rw-r--r--compiler/rustc_const_eval/src/interpret/operand.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/compiler/rustc_const_eval/src/interpret/operand.rs b/compiler/rustc_const_eval/src/interpret/operand.rs
index b906e3422db..bdbacfd20c2 100644
--- a/compiler/rustc_const_eval/src/interpret/operand.rs
+++ b/compiler/rustc_const_eval/src/interpret/operand.rs
@@ -719,6 +719,7 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> {
         if matches!(op, Operand::Immediate(_)) {
             assert!(!layout.is_unsized());
         }
+        M::after_local_read(self, local)?;
         Ok(OpTy { op, layout })
     }