Qt-Autosar-A18.5.3

The form of the delete expression shall match the form of the new expression used to allocate the memory

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 : set[str] = {'C++ArrayHeapMemory', 'C++HeapMemory'}

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.