Skip to content

Commit

Permalink
MemLeak: Do not consider unions
Browse files Browse the repository at this point in the history
  • Loading branch information
michael-schwarz committed Nov 22, 2023
1 parent 9153eb3 commit 666795f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/analyses/memLeak.ml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ struct
get_global_vars ()
|> List.filter (fun v ->
match unrollType v.vtype with
| TPtr (TComp _, _)
| TPtr ((TNamed ({ttype = TComp _; _}, _)), _) -> true
| TPtr (TComp (ci,_), _)
| TPtr ((TNamed ({ttype = TComp (ci, _); _}, _)), _) -> ci.cstruct
| TComp (_, _)
| (TNamed ({ttype = TComp _; _}, _)) -> false
| _ -> false)
Expand All @@ -37,8 +37,8 @@ struct
get_global_vars ()
|> List.filter (fun v ->
match unrollType v.vtype with
| TComp (_, _)
| (TNamed ({ttype = TComp _; _}, _)) -> true
| TComp (ci, _)
| (TNamed ({ttype = TComp (ci,_); _}, _)) -> ci.cstruct
| _ -> false)

let get_reachable_mem_from_globals (global_vars:varinfo list) ctx =
Expand Down

0 comments on commit 666795f

Please sign in to comment.