Astrée now detects and reports Spectre v1, Spectre v1.1,
and SplitSpectre vulnerabilities.
The detection is disabled by default
and can be enabled via the new option detect-spectre
.
Astrée can now track taint information for memory locations.
This new feature can be used for analyzing security properties.
It is disabled by default and can be enabled by setting the option
track-taint-hues
. Additionally, the new directives
__ASTREE_taint
and __ASTREE_taint_sink
can be inserted into the code for expressing where variables
are tainted and which memory locations must not be reached by taints.
NvM
(NVRAM Manager) and Dem
(Diagnostic Event Manager).
The stubs are located in the AUTOSAR subdirectory of the installation,
and the user manual now includes a chapter dedicated to their use and configuration.__ASTREE_smash
directives to prevent smashing on arrays in the generated AUTOSAR OS stubs.
The necessary directives are now automatically generated.__ASTREE_PHASE_CORE_INIT_TASK
can be set
in the AUTOSAR preprocessor configuration for analyses of multicore projects
with phases. This define causes core initialization tasks to be executed
in the first (initialization) phase.This is the first Astrée release to offer static run-time error analysis of C++ code. Evaluation licenses can now be issued on request.
This release introduces a new relational domain for a more precise analysis of finite-state machines.
The new domain is activated with the option state-machine=yes
and reacts to the new directive __ASTREE_states_track((x))
which indicates that x
is used to encode
the state of a state machine.
Special treatment stops upon encountering either __ASTREE_states_merge((x))
or __ASTREE_states_merge(())
.
The new option automatic-state-machine=yes
enables
automatic detection of code patterns used in state machine
implementations, for which Astrée can then insert
__ASTREE_states_track
directives.
float* fp = 0; int* ip = 0; (int*)fp = ip; /* lvalue cast */Note that such code violates the diagnostic rule A.2.6 (check
lvalue-cast
)
and is no longer supported by current C compilers.//...
).continue-on-definite-rte
.
If Astrée encounters a definite run-time error while this option is enabled,
the analysis does not stop for the affected context but carries on with partial
statement semantics.collapse-multi-dimensional-arrays
that controls whether multi-dimensional arrays are considered as
a single type layer for naming rule checks.boolean-type
is now equivalent to _Bool
for naming checks.--local-broadcast
.--export-preprocessed
such that it exports the successfully preprocessed files even when the preprocessing
of other files fails.New syntax | Old syntax |
---|---|
__ASTREE_volatile_input((v; [l,h])); | __ASTREE_volatile_input((v, [l,h])); |
__ASTREE_global_assert((v; [l,h])); | __ASTREE_global_assert((v, [l,h])); |
__ASTREE_known_range((v; [l,h])); | __ASTREE_known_range((v, [l;h])); |
__ASTREE_partition_ranges((g; [l,h], [l,h])); | __ASTREE_partition_ranges((v: [l;h], [l;h])); |
__ASTREE_partition_begin
directives,
the analyzer is now much faster, thanks to improved widening.track-taint-hues
. Additionally, the new directives
__ASTREE_taint
and __ASTREE_taint_sink
can be inserted into the code for expressing where variables
are tainted and which memory locations must not be reached by taints.__ASTREE_partition_control((1))
. Using it
in front of a loop caused the first partition to get lost.endianess
to endianness
.rounding_mode_for_constants
.
Floating point constant expressions evaluated at compile-time
are now always evaluated using rounding to nearest (as required
by the C standard, see ISO/IEC 9899:2011, F.8.2).bitfield_sign=signed
. The default ABI is now also available
as a DAX file (default_generic_32.dax) installed with the other ABIs.bits_of_byte
when determining the size of floats and doubles. (In previous releases
it only had an effect on integer types.) Therefore with
sizeof_double=4
and bits_of_byte=16
the analyzer now considers doubles to have 64 instead of only 32 bits.bits_of_byte
is set to a value other than the default of 8
.
This affects most M2012.10.x checks, if the ABI is configured
in the aforementioned way.alignof_char_array
to its default value
of 1
. The ABI for this target, as shipped with previous Astrée
releases, assumed an alignment of 4, corresponding to the compiler documentation.
To the best of our knowledge, this alignment is not used by the compiler
for aligning arrays in structs, which is the only case for which the aforementioned
option is relevant for Astrée. In such cases the compiler uses a 1-byte alignment.rulechecker
token is now released after preprocessing.<relational>no</relational>followed by
<any-relational-domain>yes</any-relational-domain>where
any-relational-domain
is the option key of any relational domain,
e.g. octagon
. In previous releases,
such specifications were accepted but led to disparate behaviors in GUI and batch mode.Options=All
no longer exports
sub-options that are disabled by their parent option. This modification
ensures that exported DAX files are always consistent with respect to the analyzer options.__ASTREE_partition_control
directive.print-all-options=yes
is introduced that forces the printing of all analyzer options,
including those set to their default values. It can be used in either mode.__ASTREE_ignore
directive
are now displayed as filtered in the editor view.--local-broadcast
.--export-preprocessed
such that it exports the successfully preprocessed files even when preprocessing
of other files fails.address-of-overload
digraph-token
stdlib-use
unrelated-pointer-conversion
unary-assign-separation
virtual-call-in-constructor
return-position
inconsistent-default-argument
null-as-integer
multiple-loop-counters
mixed-virtual-base
member-function-missing-const
controlling-invariant-expression
parameter-missing-const
wide-narrow-string-cast
andwide-narrow-string-cast-implicit
plain-char-usage
in code using the comma operator or references.underlying-cvalue-conversion
by ignoring irrelevant implicit conversions, like "non-const" to "const" pointers.%Module_abbreviation%
.
The expansion of the placeholder, e.g. xyz
, is defined per source file
using the syntax \module_abbreviation xyz
in an arbitrary comment.%Folder#%
which was ignored in all 18.04i and 18.10 builds.%bitsize%
is now also available
for objects of struct
or enum
type, including enumeration constants.collapse-multi-dimensional-arrays
that controls whether multi-dimensional arrays are considered as
a single type layer for naming rule checks.boolean-type
is now equivalent to _Bool
for naming checks.#pragma push_macro("XYZ") #pragma pop_macro("XYZ")are no longer rejected with an error message if
XYZ
is not defined.1
,
after performing partial rule checking on the successfully parsed files.max-local-variables
.max-size-of-statement
.multiple-writes-in-full-expr
warns about full expressions in which a variable is written
more than once. This is used to warn about violations of rule M.12.2.pointer-qualifier-cast-const-implicit
when the second argument
to __astree_memcpy
is a pointer to const
boolean-invariant
in switch statementsmultiple-volatile-accesses
and evaluation-order
when they take the address of an arrayarray-initialization
(rule M2012.9.3)
in case of nested arrays inside of zero-initialized structures, such asstruct { int a[2];} s = { 0 };
function-pointer-cast
for rule M.11.1
and M2012.11.1 no longer warns about null pointer constants.global-object-name | ↗ ↘ | global-object-name global-object-name-const |
static-object-name | ↗ ↘ | static-object-name static-object-name-const |
local-object-name | ↗ ↘ | local-object-name local-object-name-const |
bits_of_byte
is set to a value other than the default of 8
.
This affects most M2012.10.x checks, if the ABI is configured
in the aforementioned way.allow-signed-constant-with-unsigned
is now also considered for the check bitop-type
used in rule
CERT.INT.13, CERT.INT.16,
M.12.7, and X.A.5.integral-type-name
, used in rule M.6.3,
M2008.3.9.2, M2012.D.4.6,
X.A.5.6, and X.D.8.2.a,
now honors the exceptions 2, 3, and 4 of MISRA-C:2012 directive 4.6.
Therefore, it no longer warns about uses of the predefined types int
and char
in a declaration or definition of the main
function.#pragma
directives whose semantics are not taken into account
by Astrée.Added support for following SEI CERT coding rules/recommendations:
multiple-writes-in-full-expr
warns about full expressions
in which a variable is written more than once to warn about violations of rule M2012.13.2.float-suffix
for rule M2008.2.13.4 warns about the floating literal suffix 'f'.functional-cast
no longer reports constructor conversions.new-operator
and delete-operator
no longer warn about placement operators.unary-assign-separation
is now also applied to overloaded operator calls.functional-cast
for rule M2008.5.2.4.cast-integer-to-pointer
now warns
about casting an integral type to any pointer type.integral-type-name
now also warns
about uses of integral type names in cast operators.int a[2][2] = {}; // compliant
.unused-internal-function
(rule M2008.0.1.10)
no longer warns about template functions.&
operator
is applied to an expression of type enum
.loop-control-modification
for rule M2008.6.5.5.inappropriate-enum
for rule M2012.10.1 to eliminate
false alarms for expressions of the form &arr[e]
when e
is of enum
type.New rule set “AUTOSAR” with checks for AUTOSAR C++ coding rules as defined in the AUTOSAR document “Guidelines for the use of the C++14 language in critical and safety-related systems”.
alignof_char_array
to its default value
of 1
. The ABI for this target, as shipped with previous Astrée
releases, assumed an alignment of 4, corresponding to the compiler documentation.
To the best of our knowledge, this alignment is not used by the compiler
for aligning arrays in structs, which is the only case for which the aforementioned
option is relevant for Astrée. In such cases the compiler uses a 1-byte alignment.include
paths
have been moved to the end of the include-path list.
This allows to provide custom standard header replacements
if needed. For example, a math.h
of your own
will now overwrite the stub library math.h
shipped with the tool.__TIME__
now expands to ??:??:??
,
and likewise __DATE__
now expands to ??? ?? ????
.
This ensures stable results between different analysis runs.Context proposals for program slicing no longer contain contexts that have not been reached by the runtime error analysis.
rulechecker
token is now
immediately released as soon as the server considers the connection definitely lost.rulechecker
token is now released after preprocessing.__ASTREE_partition_control
directives instead of __ASTREE_unroll directives
for interpolation
routines.0
in the result.warn-on-field-overflows
.__ASTREE_modify
directives on arrays.__ASTREE_absolute_address
directives.dump-dataflow=no
).
Moreover, it now also contains call information for calls
that are only reachable via separately analyzed functions
(option separate-function
).__astree_create_process
with minimal arguments,
the following functions can be called for setting further process properties:
__astree_set_process_running_priority(process_id, priority)
__astree_set_process_non_realtime(process_id)
__astree_set_process_core(process_id, core)
__astree_core_process(unsigned *c)
which stores in *c
the ID of the core
that the current process is running on.struct T {}; // incomplete type ... struct T* p = (struct T*)0x1000; // ... used with absolute address
var
and declared in file.c
is now reported as var@"file.c"
....
’.
For example, the files
/test/share/libcxx/include/stdlib.h /test/testcase/stubs/stdlib.hare now represented as
.../include/stdlib.h .../stubs/stdlib.hThe short files names are used in the analyzer output as well as in the text and HTML report files.
REQ
and QK
to the legend for the construction of requirement/test case identifier names.qk_check_extra_tokens
and qk_check_non_standard_identifier
.Options |
qk_option_detect_spectre qk_option_continue_on_definite_rte qk_option_print_all_options qk_option_drop_unused_statics qk_option_filter_attributes qk_option_state_machine qk_option_automatic_state_machine qk_option_report_file qk_option_track_taint_hues qk_option_misspelled |
Directives |
qk_directive_states_track qk_directive_states_merge qk_directive_taint qk_directive_taint_sink |
Alarms |
qk_alarm_taint_sink qk_alarm_spectre_vulnerability |
Intrinsics |
qk_intrinsic_set_process_running_priority qk_intrinsic_set_process_non_realtime qk_intrinsic_set_process_core qk_intrinsic_core_process |
Checks |
qk_check_errno_reset qk_check_incompatible_argument_type qk_check_precision_shift_width qk_check_int_modulo_by_zero qk_check_write_to_string_literal qk_check_null_dereferencing qk_check_precision_shift_width_constant qk_check_array_index_range_constant qk_check_parameter_match |
Rules |
qk_rule_cert_flp_3 qk_rule_cert_msc_12 qk_rule_cert_dcl_30 qk_rule_cert_str_30 qk_rule_cert_mem_34 qk_rule_cert_arr_30, qk_rule_cert_arr_36 qk_rule_cert_err_30, qk_rule_cert_err_33 qk_rule_cert_int_8, qk_rule_cert_int_30, qk_rule_cert_int_32, qk_rule_cert_int_33, qk_rule_cert_int_34 qk_rule_cert_exp_12, qk_rule_cert_exp_33, qk_rule_cert_exp_34, qk_rule_cert_exp_37, qk_rule_cert_exp_40 qk_rule_iso17961_addrescape, qk_rule_iso17961_dblfree, qk_rule_iso17961_diverr, qk_rule_iso17961_intoflow, qk_rule_iso17961_inverrno, qk_rule_iso17961_nullref, qk_rule_iso17961_ptrobj, qk_rule_iso17961_xfree, qk_rule_iso17961_liberr, qk_rule_iso17961_uninitref, qk_rule_iso17961_invptr, qk_rule_iso17961_strmod |
The test case qk_abi_rounding_mode_for_constants
has been removed
from the Astrée QSK.
Options |
qk_option_file_name_modifier qk_option_collapse_multi_dimensional_arrays qk_option_print_all_options qk_option_report_file qk_option_anonymous_global_structs_and_unions qk_option_stop_parse_error_immediate qk_option_filter_attributes |
Placeholders |
qk_placeholder_bitsize qk_placeholder_filename qk_placeholder_folder qk_placeholder_module_abbreviation |
Checks |
qk_check_global_object_name_const qk_check_local_object_name_const qk_check_static_object_name_const qk_check_plain_char_operator qk_check_multiple_writes_in_full_expr qk_check_incompatible_function_pointer_conversion qk_check_incompatible_object_pointer_conversion qk_check_float_comparison qk_check_stdlib_use_signal qk_check_multiple_atomic_accesses qk_check_alignof_side_effect qk_check_generic_selection_side_effect qk_check_stream_argument_with_side_effects qk_check_memcmp_with_float qk_check_named_declaration_parameter qk_check_scaled_pointer_arithmetic qk_check_pointer_typedef qk_check_bad_function qk_check_alloc_without_sizeof qk_check_chained_comparison qk_check_empty_body qk_check_function_name_constant_comparison qk_check_pointer_cast_alignment qk_check_memcmp_with_padding qk_check_assignment_conditional qk_check_alloc_without_cast qk_check_flexible_array_member_assignment qk_check_flexible_array_member_declaration qk_check_malloc_size_insufficient qk_check_stdlib_use_rand qk_check_long_suffix qk_check_macro_final_semicolon qk_check_macro_parameter_multiplied qk_check_macro_parameter_unused qk_check_universal_character_name_concatenation qk_check_signal_handler_unsafe_call qk_check_signal_handler_shared_access qk_check_signal_handler_signal_call qk_check_encoding_mismatch qk_check_char_sign_conversion qk_check_wide_narrow_string_cast qk_check_wide_narrow_string_cast_implicit qk_check_switch_enum_default qk_check_precision_shift_width_constant qk_check_array_index_range_constant qk_check_parameter_match qk_check_max_local_variables qk_check_max_size_of_statement qk_check_literal_assignment_type |
Rules |
qk_rule_a_1_10,
qk_rule_a_1_11 qk_rule_t_14_1, qk_rule_t_15_1, qk_rule_t_16_1 qk_rule_cert_api_8 qk_rule_cert_arr_1, qk_rule_cert_arr_2, qk_rule_cert_arr_30, qk_rule_cert_arr_39 qk_rule_cert_con_37, qk_rule_cert_con_40 qk_rule_cert_dcl_0, qk_rule_cert_dcl_5, qk_rule_cert_dcl_7, qk_rule_cert_dcl_13, qk_rule_cert_dcl_15, qk_rule_cert_dcl_16, qk_rule_cert_dcl_18, qk_rule_cert_dcl_19, qk_rule_cert_dcl_20, qk_rule_cert_dcl_31, qk_rule_cert_dcl_36, qk_rule_cert_dcl_37, qk_rule_cert_dcl_40, qk_rule_cert_dcl_41 qk_rule_cert_env_30, qk_rule_cert_env_33 qk_rule_cert_err_7, qk_rule_cert_err_33 qk_rule_cert_exp_2, qk_rule_cert_exp_5, qk_rule_cert_exp_9, qk_rule_cert_exp_10, qk_rule_cert_exp_12, qk_rule_cert_exp_13, qk_rule_cert_exp_15, qk_rule_cert_exp_16, qk_rule_cert_exp_19, qk_rule_cert_exp_30, qk_rule_cert_exp_33, qk_rule_cert_exp_36, qk_rule_cert_exp_37, qk_rule_cert_exp_40, qk_rule_cert_exp_42, qk_rule_cert_exp_44, qk_rule_cert_exp_45 qk_rule_cert_fio_38, qk_rule_cert_fio_41 qk_rule_cert_flp_2, qk_rule_cert_flp_30, qk_rule_cert_flp_32, qk_rule_cert_flp_37 qk_rule_cert_int_9, qk_rule_cert_int_12, qk_rule_cert_int_13, qk_rule_cert_int_16, qk_rule_cert_int_34, qk_rule_cert_int_36 qk_rule_cert_mem_2, qk_rule_cert_mem_33, qk_rule_cert_mem_35 qk_rule_cert_msc_1, qk_rule_cert_msc_4, qk_rule_cert_msc_12, qk_rule_cert_msc_17, qk_rule_cert_msc_20, qk_rule_cert_msc_24, qk_rule_cert_msc_30, qk_rule_cert_msc_37, qk_rule_cert_msc_40 qk_rule_cert_pre_0, qk_rule_cert_pre_1, qk_rule_cert_pre_6, qk_rule_cert_pre_7, qk_rule_cert_pre_11, qk_rule_cert_pre_12, qk_rule_cert_pre_30, qk_rule_cert_pre_32 qk_rule_cert_sig_30, qk_rule_cert_sig_31, qk_rule_cert_sig_34 qk_rule_cert_str_5, qk_rule_cert_str_10, qk_rule_cert_str_30, qk_rule_cert_str_34, qk_rule_cert_str_37, qk_rule_cert_str_38 qk_rule_cert_win_1 qk_rule_iso17961_accsig qk_rule_iso17961_alignconv qk_rule_iso17961_argcomp qk_rule_iso17961_asyncsig qk_rule_iso17961_boolasgn qk_rule_iso17961_chrsgnext qk_rule_iso17961_filecpy qk_rule_iso17961_funcdecl qk_rule_iso17961_insufmem qk_rule_iso17961_libmod qk_rule_iso17961_padcomp qk_rule_iso17961_resident qk_rule_iso17961_sigcall qk_rule_iso17961_signconv qk_rule_iso17961_sizeofptr qk_rule_iso17961_swtchdflt qk_rule_iso17961_syscall qk_rule_iso17961_liberr qk_rule_iso17961_uninitref qk_rule_iso17961_invptr qk_rule_iso17961_strmod |