Skip to content

Commit bc02bee

Browse files
sblackshearfacebook-github-bot
authored andcommitted
[cleanup] rename thread-safety analysis
Reviewed By: jvillard Differential Revision: D6087967 fbshipit-source-id: 22bfb6d
1 parent 664616f commit bc02bee

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+212
-206
lines changed

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ BUILD_SYSTEMS_TESTS += \
4848

4949
DIRECT_TESTS += \
5050
c_biabduction c_bufferoverrun c_errors c_frontend \
51-
cpp_bufferoverrun cpp_errors cpp_frontend cpp_liveness cpp_quandary cpp_siof cpp_threadsafety cpp_uninit cpp_nullable \
51+
cpp_bufferoverrun cpp_errors cpp_frontend cpp_liveness cpp_quandary cpp_racerd cpp_siof cpp_uninit cpp_nullable \
5252

5353
ifneq ($(BUCK),no)
5454
BUILD_SYSTEMS_TESTS += buck-clang-db buck_flavors buck_flavors_run buck_flavors_deterministic
@@ -86,7 +86,7 @@ BUILD_SYSTEMS_TESTS += \
8686

8787
DIRECT_TESTS += \
8888
java_checkers java_eradicate java_infer java_lab java_tracing java_quandary \
89-
java_threadsafety java_crashcontext java_harness
89+
java_racerd java_crashcontext java_harness
9090
ifneq ($(ANT),no)
9191
BUILD_SYSTEMS_TESTS += ant
9292
endif

infer/src/backend/specs.ml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@ type payload =
336336
; quandary: QuandarySummary.t option
337337
; resources: ResourceLeakDomain.summary option
338338
; siof: SiofDomain.astate option
339-
; threadsafety: ThreadSafetyDomain.summary option
339+
; racerd: RacerDDomain.summary option
340340
; buffer_overrun: BufferOverrunDomain.Summary.t option
341341
; uninit: UninitDomain.summary option }
342342

@@ -465,7 +465,7 @@ let pp_payload pe fmt
465465
; crashcontext_frame
466466
; quandary
467467
; siof
468-
; threadsafety
468+
; racerd
469469
; buffer_overrun
470470
; annot_map
471471
; uninit } =
@@ -481,7 +481,7 @@ let pp_payload pe fmt
481481
(pp_opt "TypeState" (TypeState.pp TypeState.unit_ext))
482482
typestate (pp_opt "CrashContext" Crashcontext.pp_stacktree) crashcontext_frame
483483
(pp_opt "Quandary" QuandarySummary.pp) quandary (pp_opt "Siof" SiofDomain.pp) siof
484-
(pp_opt "ThreadSafety" ThreadSafetyDomain.pp_summary) threadsafety
484+
(pp_opt "RacerD" RacerDDomain.pp_summary) racerd
485485
(pp_opt "BufferOverrun" BufferOverrunDomain.Summary.pp) buffer_overrun
486486
(pp_opt "AnnotationReachability" AnnotReachabilityDomain.pp) annot_map
487487
(pp_opt "Uninitialised" UninitDomain.pp_summary) uninit
@@ -695,7 +695,7 @@ let empty_payload =
695695
; quandary= None
696696
; resources= None
697697
; siof= None
698-
; threadsafety= None
698+
; racerd= None
699699
; buffer_overrun= None
700700
; uninit= None }
701701

infer/src/backend/specs.mli

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ type payload =
136136
; quandary: QuandarySummary.t option
137137
; resources: ResourceLeakDomain.summary option
138138
; siof: SiofDomain.astate option
139-
; threadsafety: ThreadSafetyDomain.summary option
139+
; racerd: RacerDDomain.summary option
140140
; buffer_overrun: BufferOverrunDomain.Summary.t option
141141
; uninit: UninitDomain.summary option }
142142

infer/src/base/Config.ml

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -242,9 +242,9 @@ let manual_java = "JAVA OPTIONS"
242242

243243
let manual_quandary = "QUANDARY CHECKER OPTIONS"
244244

245-
let manual_siof = "SIOF CHECKER OPTIONS"
245+
let manual_racerd = "RACERD CHECKER OPTIONS"
246246

247-
let manual_threadsafety = "THREADSAFETY CHECKER OPTIONS"
247+
let manual_siof = "SIOF CHECKER OPTIONS"
248248

249249
(** Maximum level of recursion during the analysis, after which a timeout is generated *)
250250
let max_recursion = 5
@@ -681,14 +681,16 @@ and ( annotation_reachability
681681
, liveness
682682
, printf_args
683683
, quandary
684+
, racerd
684685
, repeated_calls
685686
, resource_leak
686687
, siof
687-
, threadsafety
688688
, suggest_nullable
689689
, uninit ) =
690-
let mk_checker ?(default= false) ~long doc =
691-
let var = CLOpt.mk_bool ~long ~in_help:CLOpt.([(Analyze, manual_generic)]) ~default doc in
690+
let mk_checker ?(default= false) ?(deprecated= []) ~long doc =
691+
let var =
692+
CLOpt.mk_bool ~long ~in_help:CLOpt.([(Analyze, manual_generic)]) ~default ~deprecated doc
693+
in
692694
all_checkers := (var, long, doc, default) :: !all_checkers ;
693695
var
694696
in
@@ -719,14 +721,16 @@ and ( annotation_reachability
719721
mk_checker ~long:"printf-args" ~default:true
720722
"the detection of mismatch between the Java printf format strings and the argument types For, example, this checker will warn about the type error in `printf(\"Hello %d\", \"world\")`"
721723
and quandary = mk_checker ~long:"quandary" ~default:true "the quandary taint analysis"
724+
and racerd =
725+
mk_checker ~long:"racerd" ~deprecated:["-threadsafety"] ~default:true
726+
"the RacerD thread safety analysis"
722727
and repeated_calls = mk_checker ~long:"repeated-calls" "check for repeated calls"
723728
and resource_leak = mk_checker ~long:"resource-leak" ""
724729
and siof =
725730
mk_checker ~long:"siof" ~default:true
726731
"the Static Initialization Order Fiasco analysis (C++ only)"
727732
and suggest_nullable =
728733
mk_checker ~long:"suggest-nullable" ~default:false "Nullable annotation sugesstions analysis"
729-
and threadsafety = mk_checker ~long:"threadsafety" ~default:true "the thread safety analysis"
730734
and uninit = mk_checker ~long:"uninit" "checker for use of uninitialized values" in
731735
let mk_only (var, long, doc, _) =
732736
let _ : bool ref =
@@ -776,10 +780,10 @@ and ( annotation_reachability
776780
, liveness
777781
, printf_args
778782
, quandary
783+
, racerd
779784
, repeated_calls
780785
, resource_leak
781786
, siof
782-
, threadsafety
783787
, suggest_nullable
784788
, uninit )
785789

@@ -1728,7 +1732,7 @@ and testing_mode =
17281732

17291733
and threadsafe_aliases =
17301734
CLOpt.mk_json ~long:"threadsafe-aliases"
1731-
~in_help:CLOpt.([(Analyze, manual_threadsafety)])
1735+
~in_help:CLOpt.([(Analyze, manual_racerd)])
17321736
"Specify custom annotations that should be considered aliases of @ThreadSafe"
17331737

17341738
and trace_join =
@@ -1979,14 +1983,14 @@ let post_parsing_initialization command_opt =
19791983
| _
19801984
-> () ) ;
19811985
( match !analyzer with
1982-
| Some BiAbduction | None
1986+
| Some BiAbduction
19831987
-> disable_all_checkers () ;
19841988
(* technically the biabduction checker doesn't run in this mode, but this gives an easy way to test if the biabduction *analysis* is active *)
19851989
biabduction := true
19861990
| Some Crashcontext
19871991
-> disable_all_checkers () ;
19881992
crashcontext := true
1989-
| Some (CaptureOnly | Checkers | CompileOnly | Linters)
1993+
| Some (CaptureOnly | Checkers | CompileOnly | Linters) | None
19901994
-> () ) ;
19911995
Option.value ~default:CLOpt.Run command_opt
19921996

@@ -2342,6 +2346,8 @@ and quandary_sinks = !quandary_sinks
23422346

23432347
and quiet = !quiet
23442348

2349+
and racerd = !racerd
2350+
23452351
and reactive_mode = !reactive || CLOpt.(equal_command Diff) command
23462352

23472353
and reactive_capture = !reactive_capture
@@ -2378,8 +2384,6 @@ and show_progress_bar = !progress_bar
23782384

23792385
and siof = !siof
23802386

2381-
and uninit = !uninit
2382-
23832387
and siof_safe_methods = !siof_safe_methods
23842388

23852389
and skip_analysis_in_path = !skip_analysis_in_path
@@ -2418,8 +2422,6 @@ and test_filtering = !test_filtering
24182422

24192423
and testing_mode = !testing_mode
24202424

2421-
and threadsafety = !threadsafety
2422-
24232425
and threadsafe_aliases = !threadsafe_aliases
24242426

24252427
and trace_error = !trace_error
@@ -2436,6 +2438,8 @@ and tv_limit = !tv_limit
24362438

24372439
and type_size = !type_size
24382440

2441+
and uninit = !uninit
2442+
24392443
and unsafe_malloc = !unsafe_malloc
24402444

24412445
and whole_seconds = !whole_seconds

infer/src/base/Config.mli

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -627,8 +627,6 @@ val show_progress_bar : bool
627627

628628
val siof : bool
629629

630-
val uninit : bool
631-
632630
val siof_safe_methods : string list
633631

634632
val skip_analysis_in_path : string list
@@ -665,7 +663,7 @@ val test_filtering : bool
665663

666664
val testing_mode : bool
667665

668-
val threadsafety : bool
666+
val racerd : bool
669667

670668
val threadsafe_aliases : Yojson.Basic.json
671669

@@ -681,6 +679,8 @@ val tv_limit : int
681679

682680
val type_size : bool
683681

682+
val uninit : bool
683+
684684
val unsafe_malloc : bool
685685

686686
val whole_seconds : bool

infer/src/checkers/registerCheckers.ml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -84,13 +84,13 @@ let all_checkers =
8484
Procedure ResourceLeaks.checker
8585
, Config.Java ) ] }
8686
; {name= "SIOF"; active= Config.siof; callbacks= [(Procedure Siof.checker, Config.Clang)]}
87-
; { name= "thread safety"
88-
; active= Config.threadsafety
87+
; { name= "RacerD"
88+
; active= Config.racerd
8989
; callbacks=
90-
[ (Procedure ThreadSafety.analyze_procedure, Config.Clang)
91-
; (Procedure ThreadSafety.analyze_procedure, Config.Java)
92-
; (Cluster ThreadSafety.file_analysis, Config.Clang)
93-
; (Cluster ThreadSafety.file_analysis, Config.Java) ] }
90+
[ (Procedure RacerD.analyze_procedure, Config.Clang)
91+
; (Procedure RacerD.analyze_procedure, Config.Java)
92+
; (Cluster RacerD.file_analysis, Config.Clang)
93+
; (Cluster RacerD.file_analysis, Config.Java) ] }
9494
; { name= "uninitialized variables"
9595
; active= Config.uninit
9696
; callbacks= [(Procedure Uninit.checker, Config.Clang)] } ]

0 commit comments

Comments
 (0)