File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 7373 ctx.emit (Events. Lock (verifier_atomic, true ))
7474
7575 let special (ctx : (unit, _, _, _) ctx ) lv f arglist : D.t =
76+ let is_activated a = List. mem a (GobConfig. get_string_list " ana.activated" ) in (* TODO: proper LibraryFunctions group selection *)
7677 let remove_rw x = x in
7778 let unlock remove_fn =
7879 match f.vname, arglist with
8283 ctx.split () [Events. Unlock (remove_fn e)]
8384 ) (eval_exp_addr (Analyses. ask_of_ctx ctx) arg);
8485 raise Analyses. Deadcode
85- | "LAP_Se_SignalSemaphore" , [Lval arg; _] ->
86+ | "LAP_Se_SignalSemaphore" , [Lval arg; _] when is_activated " arinc " || is_activated " extract_arinc " ->
8687 List. iter (fun e ->
8788 ctx.split () [Events. Unlock (remove_fn e)]
8889 ) (eval_exp_addr (Analyses. ask_of_ctx ctx) (Cil. mkAddrOf arg));
@@ -101,7 +102,7 @@ struct
101102 | "spin_lock_irqsave" , [arg; _] ->
102103 (* print_endline @@ "Mutex `Lock "^f.vname;*)
103104 lock ctx rw failing nonzero_return_when_aquired (Analyses. ask_of_ctx ctx) lv arg
104- | "LAP_Se_WaitSemaphore" , [Lval arg; _; _] ->
105+ | "LAP_Se_WaitSemaphore" , [Lval arg; _; _] when is_activated " arinc " || is_activated " extract_arinc " ->
105106 (* print_endline @@ "Mutex `Lock "^f.vname;*)
106107 lock ctx rw failing nonzero_return_when_aquired (Analyses. ask_of_ctx ctx) lv (Cil. mkAddrOf arg)
107108 | _ -> failwith " lock has multiple arguments"
You can’t perform that action at this time.
0 commit comments