Skip to content

Commit b7e43c5

Browse files
committed
Do not record thread-unsafe lib fun calls in single-threaded mode #1260
1 parent 8bb2c5f commit b7e43c5

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 then (
372+
if List.mem LibraryDesc.ThreadUnsafe desc.attrs && not (ctx.ask (Queries.MustBeSingleThreaded {since_start=true})) 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)