FaultDetection-MemoryLeak

Do not forget to free allocated memory

Required inputs: IR, StaticSemanticAnalysis

This check detects resource allocations with no corresponding free/delete, meaning that the resource leaks.

Possible Messages

Key

Text

Severity

Disabled

memory_leak

Call allocates leaking memory

None

False

possible_memory_leak

Call allocates possibly leaking memory

None

False

Options

resources

resources

Type: set[str]

Default: {'C++HeapMemory', 'CudaAsyncMemory', 'CudaDeviceMemory', 'CudaDriverAsyncMemory', 'CudaHostMemory', 'CudaManagedMemory', 'HeapMemory', 'UniquePtrHeapMemory'}

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

witness_paths

witness_paths : bool = True

Whether witness paths should be determined and included in the issue.
 

witness_should_include_exception_handling

witness_should_include_exception_handling : bool = False

Whether to only accept witness paths that include some kind of exception handling.