Skip to content

Commit

Permalink
Add extra debugging information to non-null assertion
Browse files Browse the repository at this point in the history
  • Loading branch information
ahomescu committed Jun 15, 2024
1 parent 3b030da commit 3a5ab91
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion pdg/src/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 3a5ab91

Please sign in to comment.