From 3a5ab919dc2fe972aa1a55e969ecb23c3ed3761f Mon Sep 17 00:00:00 2001 From: Andrei Homescu Date: Fri, 17 May 2024 22:48:51 -0700 Subject: [PATCH] Add extra debugging information to non-null assertion --- pdg/src/builder.rs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/pdg/src/builder.rs b/pdg/src/builder.rs index 8d37063ff3..b41d82c941 100644 --- a/pdg/src/builder.rs +++ b/pdg/src/builder.rs @@ -282,7 +282,15 @@ pub fn add_node( let node_id = graphs.graphs[graph_id].nodes.push(node); // Assert that we're not mixing null and non-null pointers - assert!(graphs.graphs[graph_id].is_null == ptr_is_null); + assert!( + graphs.graphs[graph_id].is_null == ptr_is_null, + "graph[{}].is_null == {:?} != {:x?} for {:?}:{:?}", + graph_id, + graphs.graphs[graph_id].is_null, + ptr, + event, + event_metadata + ); update_provenance( provenances,