SecureCoding-5.2

Accessing freed memory

Required inputs: IR, StaticSemanticAnalysis

Rule description is currently unavailable for legal reasons.

Possible Messages

Key

Text

Severity

Disabled

double_free

Dynamic memory released here was already released earlier

None

False

possible_double_free

Dynamic memory released here possibly already released earlier

None

False

possible_use_after_free

Dynamic memory possibly used after it was previously released

None

False

use_after_free

Dynamic memory used after it was previously released

None

False

Options

functions_with_ignored_deallocators

functions_with_ignored_deallocators : set[str] = set()

Set of functions (given by their qualified name) where all deallocators are ignored. For these functions, the check will never report a use-after-free. It will also assume that these functions never create freed pointers, neither by return value, out param, nor by modifying global state.
 

report_freed_this_at_call

report_freed_this_at_call : bool = False

This option controls findings when a freed pointer is used in C++ to call a non-static member function. When set to true, the use at the call is directly reported. When false, the analysis waits for an actual dereference (of the this-pointer then) inside the callee, and only reports those.
 

report_read_pointer_args_in_calls_to_undefined

report_read_pointer_args_in_calls_to_undefined : bool = True

Report when freed pointers are passed to undefined (external) functions.
 

resources

resources : set[str] = {'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.