FaultDetection-MissingRequiredOperations

When allocated in specific ways, some resource operations are required before deallocation

Required inputs: IR, StaticSemanticAnalysis

This check detects resources which require a certain operation (call to a function), but that call was missing.

Possible Messages

Key

Text

Severity

Disabled

possibly_required_operation

The way in which this resource was allocated possibly requires some operation

None

False

required_operation

The way in which this resource was allocated requires some operation

None

False

Options

maximum_number_of_threads

maximum_number_of_threads : int = 0

This option determines how many threads are used during computation of this rule at most. With 0, the maximum number of threads is automatically determined with a heuristic that considers the number of available CPU cores as well as the available memory.
 

required

required

Type: dict[str, dict[str, dict[str, bool | str]]]

Default:

{
   'Thread': {
      'Detaching a running thread.': {
         'Required_Functions': 'std::thread::detach'
      },
      'Joining a running thread.': {
         'Required_Functions': 'std::thread::join'
      }
   }
}
Dict which lists required operations per resource. The mapping gives each case a description which maps to a dict for key "Required_Functions".
 

resources

resources : set[str] = {'Thread'}

Set of resources to be checked (selection of rules in the Resources group).