Skip to content

Commit ecd0bc5

Browse files
committed
Do not record thread-unsafe lib fun calls after all threads have joined
1 parent c26c83e commit ecd0bc5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/analyses/raceAnalysis.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,7 @@ struct
369369
let special ctx (lvalOpt: lval option) (f:varinfo) (arglist:exp list) : D.t =
370370
(* perform shallow and deep invalidate according to Library descriptors *)
371371
let desc = LibraryFunctions.find f in
372-
if List.mem LibraryDesc.ThreadUnsafe desc.attrs && not (ctx.ask (Queries.MustBeSingleThreaded {since_start=true})) then (
372+
if List.mem LibraryDesc.ThreadUnsafe desc.attrs && ThreadFlag.is_currently_multi (Analyses.ask_of_ctx ctx) then (
373373
let exp = Lval (Var f, NoOffset) in
374374
let conf = 110 in
375375
let kind = AccessKind.Call in

0 commit comments

Comments
 (0)