Auto merge of #1601 - RalfJung:misc, r=RalfJung
pointer tag tracking: also show when tag is being created Also use bash to make sure `&>` works.
This commit is contained in:
commit
5fdea5be99
@ -1,5 +1,6 @@
|
||||
use std::cell::RefCell;
|
||||
use std::fmt;
|
||||
use std::num::NonZeroU64;
|
||||
|
||||
use log::trace;
|
||||
|
||||
@ -41,6 +42,7 @@ impl MachineStopType for TerminationInfo {}
|
||||
|
||||
/// Miri specific diagnostics
|
||||
pub enum NonHaltingDiagnostic {
|
||||
CreatedPointerTag(NonZeroU64),
|
||||
PoppedPointerTag(Item),
|
||||
CreatedCallId(CallId),
|
||||
CreatedAlloc(AllocId),
|
||||
@ -266,6 +268,8 @@ fn process_diagnostics(&self, info: TopFrameInfo<'tcx>) {
|
||||
for e in diagnostics.drain(..) {
|
||||
use NonHaltingDiagnostic::*;
|
||||
let msg = match e {
|
||||
CreatedPointerTag(tag) =>
|
||||
format!("created tag {:?}", tag),
|
||||
PoppedPointerTag(item) =>
|
||||
format!("popped tracked tag for item {:?}", item),
|
||||
CreatedCallId(id) =>
|
||||
|
@ -168,6 +168,9 @@ pub fn new(tracked_pointer_tag: Option<PtrId>, tracked_call_id: Option<CallId>)
|
||||
|
||||
fn new_ptr(&mut self) -> PtrId {
|
||||
let id = self.next_ptr_id;
|
||||
if Some(id) == self.tracked_pointer_tag {
|
||||
register_diagnostic(NonHaltingDiagnostic::CreatedPointerTag(id));
|
||||
}
|
||||
self.next_ptr_id = NonZeroU64::new(id.get() + 1).unwrap();
|
||||
id
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user