You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ifnot (ctx.ask (Queries.MustBeSingleThreaded { since_start =true })) then
23
+
M.warn ~category:(Behavior (UndefinedMemoryLeak)) ~tags:[CWE401] "Program isn't running in single-threaded mode. A memory leak might occur due to multi-threading"
24
+
25
+
(* TRANSFER FUNCTIONS *)
26
+
letassignctx (lval:lval) (rval:exp) : D.t =
27
+
ctx.local
28
+
29
+
letbranchctx (exp:exp) (tv:bool) : D.t =
30
+
ctx.local
31
+
32
+
letbodyctx (f:fundec) : D.t =
33
+
ctx.local
34
+
35
+
letreturnctx (exp:exp option) (f:fundec) : D.t =
36
+
let state = ctx.local in
37
+
(* TODO: Is this too hacky of a solution? *)
38
+
if f.svar.vname ="main"&¬@@D.is_empty state then
39
+
M.warn ~category:(Behavior (UndefinedMemoryLeak)) ~tags:[CWE401] "Memory leak from function \"%s\": %a\n" f.svar.vname D.pretty state;
0 commit comments