AutosarC++19_03-A5.3.2

Null pointers shall not be dereferenced

Required inputs: IR

Possible Messages

Key

Text

Severity

Disabled

unchecked_dereference

Unchecked dereference.

None

False

Options

allow_non_null_comparison

allow_non_null_comparison : bool = True

Whether to allow comparisons to non-null objects (e.g., &x for a given variable x) as checks.
 

dereference_filter

dereference_filter : typing.Callable[[Direct_Object_Selection_Interface], bool] | None = None

Filter predicate for dereferenced objects.
 

ignored_object_types

ignored_object_types : set[bauhaus.ir.LIR_Class_Name] = set()

Types of LIR classes which are allowed to be dereferenced without further checks.
 

null_check_macro

null_check_macro : bauhaus.analysis.config.MacroName = ''

Name of macro used to represent check for NULL.
 

null_check_routines

null_check_routines : set[bauhaus.analysis.config.QualifiedName] = set()

Qualified names of functions used to realize a null check.
 

routines_returning_valid_pointers

routines_returning_valid_pointers : set[bauhaus.analysis.config.QualifiedName] = {'std::make_shared', 'std::make_unique'}

Routines that always return valid pointers. No check is enforced for variables defined using the return value of one of the routines.
 

types_ignored_by_qualified_name

types_ignored_by_qualified_name : set[bauhaus.analysis.config.QualifiedName] = set()

Fully qualified names of types to be considered as non-null without further check.