Skip to content

Commit 77c0423

Browse files
Use ctx.node instead of ctx.prev_node again
1 parent 0f70fbc commit 77c0423

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/analyses/mallocWrapperAnalysis.ml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ struct
8080
if Hashtbl.mem wrappers f.svar.vname then
8181
match wrapper_node with
8282
| `Lifted _ -> wrapper_node (* if an interesting callee is called by an interesting caller, then we remember the caller context *)
83-
| _ -> (`Lifted ctx.prev_node) (* if an interesting callee is called by an uninteresting caller, then we remember the callee context *)
83+
| _ -> (`Lifted ctx.node) (* if an interesting callee is called by an uninteresting caller, then we remember the callee context *)
8484
else
8585
PL.top () (* if an uninteresting callee is called, then we forget what was called before *)
8686
in
@@ -97,7 +97,7 @@ struct
9797
match desc.special arglist with
9898
| Malloc _ | Calloc _ | Realloc _ ->
9999
let counter, wrapper_node = ctx.local in
100-
(MallocCounter.add_malloc counter ctx.prev_node, wrapper_node)
100+
(MallocCounter.add_malloc counter ctx.node, wrapper_node)
101101
| _ -> ctx.local
102102

103103
let startstate v = D.bot ()
@@ -120,7 +120,7 @@ struct
120120
| Q.HeapVar ->
121121
let node = match wrapper_node with
122122
| `Lifted wrapper_node -> wrapper_node
123-
| _ -> ctx.prev_node
123+
| _ -> ctx.node
124124
in
125125
let count = MallocCounter.find (`Lifted node) counter in
126126
let var = get_heap_var (ctx.ask Q.CurrentThreadId, node, count) in

0 commit comments

Comments
 (0)