FaultDetection-NullPointerDereference

There shall be no attempt to dereference a null pointer

Required inputs: IR, StaticSemanticAnalysis

This check detects pointer dereferences where a nullptr/NULL could appear as pointer value.

Possible Messages

Key

Text

Severity

Disabled

null_deref

Pointer is NULL at dereference

None

False

null_this_arg

Pointer passed in as argument for this is NULL

None

False

possible_null_deref

Pointer may be NULL at dereference

None

False

possible_null_deref_improbable

Pointer may be NULL at dereference (improbable)

None

False

possible_null_this_arg

Pointer passed in as argument for this may be NULL

None

False

Options

filter_multiple_instances

filter_multiple_instances : bool = False

Whether a null pointer dereferenced multiple times in the same function should be reported only once.
 

report_null_this

report_null_this : bool = False

Whether a null pointer as argument for the this-parameter should be reported in non-virtual calls as well.
 

witness_paths

witness_paths : bool = True

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