Skip to content

Commit

Permalink
Do not record thread-unsafe lib fun calls after all threads have joined
Browse files Browse the repository at this point in the history
  • Loading branch information
karoliineh committed Dec 27, 2023
1 parent c26c83e commit ecd0bc5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/analyses/raceAnalysis.ml
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ struct
let special ctx (lvalOpt: lval option) (f:varinfo) (arglist:exp list) : D.t =
(* perform shallow and deep invalidate according to Library descriptors *)
let desc = LibraryFunctions.find f in
if List.mem LibraryDesc.ThreadUnsafe desc.attrs && not (ctx.ask (Queries.MustBeSingleThreaded {since_start=true})) then (
if List.mem LibraryDesc.ThreadUnsafe desc.attrs && ThreadFlag.is_currently_multi (Analyses.ask_of_ctx ctx) then (
let exp = Lval (Var f, NoOffset) in
let conf = 110 in
let kind = AccessKind.Call in
Expand Down

0 comments on commit ecd0bc5

Please sign in to comment.