FaultDetection-WrongReleaseFunction

Release dynamically allocated memory with appropriate function

Required inputs: IR, StaticSemanticAnalysis

This check detects cases where a resource is freed/deallocated with the wrong function, e.g. a normal delete used on something allocated as array with new[].

Possible Messages

Key

Text

Severity

Disabled

possible_wrong_release

Resource possibly released using wrong function (allocation used {node0})

None

False

wrong_release

Resource released using wrong function (allocation used {node0})

None

False

Options

resources

resources

Type: set[str]

Default: {'C++ArrayHeapMemory', 'C++HeapMemory', 'CudaAsyncMemory', 'CudaDeviceMemory', 'CudaDriverAsyncMemory', 'CudaHostMemory', 'CudaManagedMemory', 'FileHandle', '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.