CUDASecurity-CON04¶
Do not allow data races in multithreaded code
Required inputs: IR
Based on: CertC-CON43
With excerpts from SEI CERT, Copyright (C) 1995-2021 Carnegie Mellon University. See 9.4 3rd-Party Licenses in the documentation for full details.Possible Messages
Key |
Text |
Severity |
Disabled |
|---|---|---|---|
data-race |
Do not allow data races in multithreaded code. |
None |
False |
threads-write |
Prevent data races when writing from multiple threads. |
None |
False |
write-race |
Prevent data races when writing from multiple threads. |
None |
False |
Options¶
This rule shares the following common options: confidence, exclude_in_macros, exclude_messages_in_system_headers, excludes, extend_exclude_to_macro_invocations, includes, justification_checker, languages, post_processing, provider, report_at, severity
The following places define options that affect this rule: Stylechecks, Analysis-GlobalOptions
enter_critical_functions¶
enter_critical_functions : set[bauhaus.analysis.config.QualifiedName] = {'std::lock_guard::lock_guard', 'std::mutex::lock'}
enter_critical_macros¶
enter_critical_macros : set[bauhaus.analysis.config.MacroName] = set()
exit_critical_functions¶
exit_critical_functions : set[bauhaus.analysis.config.QualifiedName] = {'std::lock_guard::~lock_guard', 'std::mutex::unlock'}
exit_critical_macros¶
exit_critical_macros : set[bauhaus.analysis.config.MacroName] = set()
inspect_pointers¶
inspect_pointers : bool = True
nested_critical_regions¶
nested_critical_regions : bool = True
report_read_races¶
report_read_races : bool = False
synchronizing_routines¶
synchronizing_routines
Calls to these routines will be considered synchronization points. Usually, global memory is written before such a point and only safely read afterwards.Type: set[bauhaus.analysis.config.QualifiedName]
Default:
{'__syncthreads', 'cooperative_groups::__v1::thread_block::sync', 'cuda::barrier::arrive_and_wait', 'cuda::barrier::wait'}