Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use PDG to remove NON_NULL from pointers in static analysis
Browse files Browse the repository at this point in the history
Remove the NON_NULL permission from all nodes in
the null graph from the PDG.
ahomescu committed Apr 25, 2024
1 parent a5d5f99 commit ac9abd6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion c2rust-analyze/src/analyze.rs
Original file line number Diff line number Diff line change
@@ -993,7 +993,10 @@ fn run(tcx: TyCtxt) {
if !node_info.unique {
perms.remove(PermissionSet::UNIQUE);
}
// TODO: PermissionSet::NON_NULL
if let Some(true) = g.is_null {
// TODO: is this enough?
perms.remove(PermissionSet::NON_NULL);
}

if perms != old_perms {
let added = perms & !old_perms;

0 comments on commit ac9abd6

Please sign in to comment.