]> git.lizzy.rs Git - rust.git/blobdiff - src/diagnostics.rs
added deallocation tracking
[rust.git] / src / diagnostics.rs
index 2359b67323d753856d4d831c3f32138932cb0a9a..8c7bb8a47c638ae13df3942c8988c215471fbbd7 100644 (file)
@@ -42,6 +42,7 @@ impl MachineStopType for TerminationInfo {}
 pub enum NonHaltingDiagnostic {
     PoppedTrackedPointerTag(Item),
     CreatedAlloc(AllocId),
+    FreedAlloc(AllocId),
 }
 
 /// Emit a custom diagnostic without going through the miri-engine machinery
@@ -191,6 +192,8 @@ fn process_diagnostics(&self) {
                         format!("popped tracked tag for item {:?}", item),
                     CreatedAlloc(AllocId(id)) =>
                         format!("created allocation with id {}", id),
+                    FreedAlloc(AllocId(id)) =>
+                        format!("freed allocation with id {}", id),
                 };
                 report_msg(this, "tracking was triggered", msg, vec![], false);
             }