AutosarC++19_03-A15.5.3

The std::terminate() function shall not be called implicitly

Required inputs: IR, StaticSemanticAnalysis

Possible Messages

Key

Text

Severity

Disabled

exception_escaping_constructor

Escaping exception from constructor.

None

False

exception_escaping_destructor

Escaping exception from destructor.

None

False

exception_escaping_initialization

Uncaught exception raised in initialization or finalization

None

False

exception_escaping_main

Uncaught exception escaping from main or additional entry point

None

False

exception_specification_violation

Exception violates function’s exception-specification.

None

False

exception_specification_violation_from_call

Exceptions propagated from this call violate function’s exception-specification.

None

False

implicit_noexcept_spec_violation_without

Function implicitly declared noexcept(false) but no exceptions will be thrown.

None

False

noexcept_spec_violation_with

Exception violates function’s noexcept-specification.

None

False

noexcept_spec_violation_without

Function declared noexcept(false) but no exceptions will be thrown.

None

False

possibly_required_operation

This thread is possibly joinable on destructor call

None

False

required_operation

This thread is joinable on destructor call

None

False

Options

allowed_exceptions

allowed_exceptions : set[str] = {'bad_alloc', 'bad_cast', 'failure', 'runtime_error', 'system_error'}

Exceptions that are allowed to escape from destructors.
 

constructors

constructors : bool = False

Whether to consider constructors.
 

destructors

destructors : bool = True

Whether to consider destructors.
 

exclude_exception_base_classes

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

Exclude issues for the exception types mentioned in this set of qualified names. Also excludes classes derived from those class names as well as pointers or references to any of these class types.
 

generate_violation_path

generate_violation_path : bool = True

Whether to compute a trace for the exception. This improves the usability of the violation description, but requires additional computing which might slow down the rule.
 

ignore_constructor_destructor

ignore_constructor_destructor : bool = True

Whether to ignore escaping exceptions from constructors and destructors.
 

ignore_implicit_noexcept_spec_lambda

ignore_implicit_noexcept_spec_lambda : bool = False

Whether to ignore lambda call operator functions with implicit noexcept specifications.
 

ignore_throwing_functions

ignore_throwing_functions : bool = False

Whether to ignore noexcept specification violations on function that actually throw an exception.
 

ignore_unknown_routines

ignore_unknown_routines : bool = False

Whether to ignore extern or only declared routines.
 

inspect_at_exit_handlers

inspect_at_exit_handlers : bool = True

Whether to also inspect at_exit() handlers-functions.
 

inspect_atexit_entry_points

inspect_atexit_entry_points : bool = False

Whether to inspect routines set by the atexit/std::atexit function.
 

inspect_thread_main

inspect_thread_main : bool = True

Whether to also inspect thread main functions.
 

report_at_call

report_at_call : bool = False

If set to true, the error is reported at the call-sites of routines throwing exceptions rather than at the throw.
 

report_noexcept_false_violations

report_noexcept_false_violations : bool = False

Whether to report cases where the function is declarared noexcept(false), but no exceptions are ever thrown (directly or indirectly).
 

report_only_one_exception_per_function

report_only_one_exception_per_function : bool = False

Report at most one uncaught exception per function. This suppresses issues at sites where an uncaught exception is thrown to get a faster execution of the check. Setting this parameter to True will result in false negatives: Real issues may not be detected anymore.
 

required

required

Type: dict[str, dict[str, dict[str, bool | str]]]

Default:

{
   'Thread': {
      'Writing to a read-only file stream': {
         'Required_Functions': 'std::thread::join,std::thread::detach'
      }
   }
}
Dict which lists required operations per resource. The mapping gives each case a description which maps to a dict for key "Required_Functions".
 

resources

resources : set[str] = {'Thread'}

Set of resources to be checked (selection of rules in the Resources group).