RuleChecker can now analyze C++ code. This release introduces support for a majority of MISRA C++:2008 rules.
For both Astrée and RuleChecker, floating licenses are now available in addition to node-locked licenses. Any existing node-locked license can be upgraded to floating if desired. Contact support@absint.com with any questions.
Astrée now includes target-specific configurations for CompCert, ensuring that the analyzer considers the correct ABI for each target and soundly approximates CompCert’s built-in functions.
On request and for an additional fee, RuleChecker is now also available for macOS High Sierra 10.13 or newer.
For all operating systems, the portable version now comes as a ZIP file.
The top-level directory within is named like the file itself, including the build number,
with the .app
suffix added on macOS. This prevents different builds from
overwriting each another upon unzip.
Under Linux, the ZIP file also contains the install script, should you later decide to install the software rather than running it from the unzipped directory.
The C frontend now fully supports the ISO/IEC 9899:2011 language syntax, including:
_Noreturn
functions
_Alignas
specifiers
_Alignof
operator
lvalue
casts at the left-hand side of assignmentslvalue
expressions of incomplete type, which is undefined behavior#
operator.#
operator in the frontend’s internal preprocessor
to omit superfluous whitespace in the resulting string-literal.0xx0
).The share
directory of the installation now contains target-specific configurations
for CompCert.
Loading such a configuration ensures that the analyzer considers the correct ABI
for that target and that it understands and soundly approximates all built-in
functions of CompCert for that particular target.
<external-declarations/>
section.
The declarations from subsequent <external-declaration/>
sections are appended
to already imported declarations. Moreover, <external-declaration/>
sections
can now be imported from other DAX files.$A3_SHARE_DIR
variable. It can be used for importing ABI and compiler configurations that are shipped
with the tool. For example:
<abi import="${A3_SHARE_DIR}/abi/ppc32.dax">
<preprocess/>
section from other DAX files.
The imported configuration can be extended by further preprocessing configurations.The ABI now allows to configure the following types:
size_t
ptrdiff_t
wchar_t
wint_t
char16_t
char32_t
intptr_t
intmax_t
sig_atomic_t
max_atomic_width
for specifying
the maximum width of lock-free atomic operation supported by the target.clamp-out-of-bound-array-index
warn-on-stub-invocation
--export-preprocessed <target-directory>
--export-aal <filename>
--export-entry-functions <file.xml>
list-entry-functions
is enabled--export-only
--export
or --export-aal
,
to prevent the analysis from being executed and only perform the specified export actions__ASTREE_check_separate_targets
,
which takes as argument a list of (at least two) lvalues
,
and checks if any two of them may point to the same variable.
If that is the case, a “Check failure” alarm is emitted,
including the actual bytes pointed to in the variable.__ASTREE_volatile_input
now uses the syntax lo..hi
for index ranges:
__ASTREE_volatile_input((a, { 0..2: [23, 42] }));The old syntax
lo-hi
is now deprecated.[1..0]
in directives are now reported
as errors in addition to ignoring the erroneous directive./* Semantic hypotheses */
section of the analyzer output.insert before
. In previous versions the directive was incorrectly placed
after the label rather than in front of it.--cxx-version
controls the version of C++ that is assumed
when preprocessing and checking C++ code. The default version is C++14.<preprocessor>
’s child element <destination>
together with its attribute delete-files
<preprocessor>
’s attribute use-relative-paths
<osek>
’s child element <output-directory>
..
”
are now normalized in batch mode execution as well. This does away with error messages
of the form
Unknown file in RuleChecker configuration: /a/path/with/../in/it.c
cut-integer-division-by-zero
is set, so that consecutive alarms do not occur.__ASTREE_modify
for specifying ranges for calibration parameters declared const volatile
.
The wrapper generator and the latest version of the AbsInt Toolbox for TargetLink
both suppress these warnings by generating additional __ASTREE_suppress
directives.warn-read-of-never-written-variables
is set, Astrée now also raises an alarm when a global variable
is read that was only initially set to 0
but not explicitly written to.<type> initializer range <value> not included in [interval]Instead, it raises an alarm of the form
<type1> -> <type2> conversion range [interval] not included in [interval]
dump-data-dictionary
now prints static variables
in the same format that is accepted when specifying input ranges
for static variables in the wrapper file. Example:
data-dictionary: static_var_name@"file_name.c" of type signed int in {1} / != 0
ASTREE_comment
are now also included in HTML report files.<functions/>
section of the XML report file.type
of the <analysis/>
tag. The possible values are Astree
and RuleChecker
.separate-functions
or analyzing
asynchronous code.dump-dataflow
is disabled,
the analyzer no longer writes unused data flow information to the result files.__ASTREE_comment
directive in an AAL annotation.__ASTREE_known_range
,
__ASTREE_trash
and __ASTREE_check_separate_targets
.__ASTREE_smash_variables
.long long
or long double
to only 4 bytes.setjmp()
and longjmp()
stubs library to make them syntactically valid in all circumstances.fgets
function has been modified to allow for more precise analysis results when reading up to 1024 bytes.setlocale
function now handles NULL
pointer arguments.lconv
struct returned by the localeconv
function is now always initialized./* removed parameter */
.__ASTREE_suppress
directives are now generated
when specifying ranges for inputs, to avoid justified but undesired alarms
about writes to const volatile declared variables (e.g. calibration parameters).__ASTREE_suppress
directives
when specifying ranges for const volatile
declared calibration parameters
in order to avoid justified but undesired alarms about writes to constant memory.separate-function=*
is set.skip-analysis=yes
.dependencies
has been removed. Whether the analyzer
uses the abstract domain of arithmetic-geometric progression now only depends
on the option dev-geo
.variablename@"filename"
.
Here are three examples for specifying the initial ranges of such variables:
__ASTREE_modify((x1@"file1.c"; [1,1])); __ASTREE_modify((x2@"file2.c".field1; [42,42])); __ASTREE_modify((x3@"file3.c"[2]; [17,17]));
__ASTREE_ignore
are no longer marked green in the editor view.#if
directive no longer trigger error messages.#include
directives when rule checking.struct-type-incomplete
now also reports non-compliant anonymous struct types,
and no longer issues alarms for opaque pointers to structs/unions:
struct ST *p; // Compliant even if no definition for ST is given
qk_abi_size_t
qk_abi_ptrdiff_t
qk_abi_wchar_t
qk_abi_wint_t
qk_abi_char16_t
,
qk_abi_char32_t
qk_abi_intptr_t
,
qk_abi_intmax_t
qk_abi_sig_atomic_t
qk_option_cxx_version
qk_option_warn_on_stub_invocation
qk_option_clamp_out_of_bound_array_index
qk_option_config_file
qk_option_merge_separate_contexts
qk_directive_check_separate_targets
qk_commandline_export
,
qk_commandline_export_aal
,
qk_commandline_export_preprocessed
,
qk_commandline_export_only
qk_rule_a_1_7
,
qk_rule_a_1_9
,
qk_rule_a_1_8
,
qk_rule_a_2_10
,
qk_rule_a_5_2
qk_rule_cwe_476
,
qk_rule_cwe_561
qk_rule_s_typ_2_1
,
qk_rule_s_typ_2_2
,
qk_rule_s_typ_2_3
qk_abi_max_atomic_width
qk_check_union_typedef_name
,
qk_check_union_typedef_name_max_length
,
qk_check_union_typedef_name_min_length
qk_check_assignment_to_non_modifiable_lvalue
qk_check_redeclaration
qk_check_initializer_excess
qk_check_excessive_interval
qk_check_invalid_directive
qk_check_min_comment_density_his
qk_check_binary_constant
qk_check_hexadecimal_escape_sequence
qk_check_include_characters_backslash
qk_check_unsupported_language_feature
qk_check_mmline_comment
,
qk_check_smline_comment
qk_check_static_function_declaration
,
qk_check_static_object_declaration
qk_check_universal_character_name
qk_commandline_export
,
qk_commandline_export_preprocessed
qk_directive_comment_source
qk_option_cxx_version
qk_option_type_abbreviations
qk_check_mline_comment
,
qk_check_other_escape_sequence
,
qk_check_static_declaration
,
qk_alarm_initializer_range
,
qk_option_dependencies
).__astree_bzero
dynamic-smash-variables-threshold
dynamic-smash-variables-threshold
,
generate-undeclared-absolute-addresses
, and assume-unkonwn-pointers-are-valid
function-pointer-integer-cast
when analyzing expressions involving null pointer constants.auto-generate-stubs=no
.This is the first stable release of RuleChecker to support checking C++ code for compliance with MISRA C++:2008 rules.
multiple-volatile-accesses
and logop-side-effect
, and the respective rules
M.12.2, M2012.13.2, and M.12.4.
#pragma
.include-characters
has been split into the two checks
include-characters
and include-characters-backslash
.non-standard-keyword
are now also reported for the keywords typeof
,
__asm
, __asm__
, and __alignof__
.
This affects rule M2012.1.2 and M.1.1.statement-sideeffect
and expression-statement-dead
now warn about statements containing the ?:
operator if at least one branch
has no side effect. This affects rule M.14.2 and M2012.2.2.define-in-block
to function bodies.type-compatibility
(rule M.8.4)
now uses the unqualified types of function parameters when checking for type compatibility.identifier-hidden
now warns about hidden tags.
This affects rule M.5.2.octal-constant
(M.7.1, M2012.7.1)octal-escape-sequence
(M.7.1)other-escape-sequence
(M.4.1)bitop-type
now also checks the sign of the right-hand side of shift operators
(<<
, >>
, <<=
, >>=
).
Furthermore, it now considers signed integer constants of positive value
as underlying signed and reports rule violations in such cases. This affects rule M.12.7.const struct { int non_const_qualified_member; } const_qualified_structure; // assignment-to-non-modifiable-lvalue const_qualified_structure.non_const_qualified_member = 0; // pointer-qualifier-cast (int *) &const_qualified_structure.non_const_qualified_member;
identifier-unique-typedef
(rule M.5.3,
M.5.6, M.5.7, and M2012.5.6) now reports the locations of both the typedef and the conflicting occurrence.identifier-unique-tag
in case of forward-declared structs.
This affects rule M.5.4, M.5.6,
M.5.7, and M2012.5.7.type-compatibility
(rule M.8.4)
and parameter-missing-const
(rule M.16.7, M2012.8.13).reserved-identifier
now warns about any identifier
starting with an underscore, including identifiers of the standard library.
This affects rule M.20.1,
M2008.17.0.1, and
M2012.21.1.integral-type-name
in rule M.6.3 and M2012.D.4.6
no longer warns about the use of _Bool
, _Complex
, and _Imaginary
.
The only check to warn about these type names is now integral-type-name-extended
in rule X.A.5.6.multiple-volatile-accesses
and logop-side-effect
, and the respective rules
CERT.EXP.2, CERT.EXP.10,
and CERT.EXP.30.statement-sideeffect
and expression-statement-dead
now warn about statements containing the ?:
operator if at least one branch
has no side effect. This affects rule CERT.MSC.12.reserved-identifier
now warns about any identifier
starting with an underscore, including identifiers of the standard library.
This affects rule CERT.DCL.37.bitop-type
now considers signed integer constants of positive value
as underlying signed and reports rule violations in such cases. This affects rule CERT.INT.13.type-compatibility
for rule CERT.DCL.40
now uses the unqualified types of function parameters when checking for type compatibility.octal-constant
for rule CERT.DCL.18
has been extended to preprocessing directives.The check reserved-identifier
now warns about any identifier
starting with an underscore, including identifiers of the standard library.
This affects rule ISO.17961.44.
initializer-excess
warns about braced initializer lists exceeding the size of the object initialized.redeclaration
warns about re-declarations of an identifier without linkage in the same scope.0b0101
(GCC extension).non-standard-keyword
are now also reported for the keywords typeof
,
__asm
, __asm__
, and __alignof__
.
This affects rule A.2.7.type-compatibility
(rule A.1.1).const struct { int non_const_qualified_member; } const_qualified_structure; // assignment-to-non-modifiable-lvalue const_qualified_structure.non_const_qualified_member = 0; // pointer-qualifier-cast (int *) &const_qualified_structure.non_const_qualified_member;
type-compatibility
(rule A.1.1)
now uses the unqualified types of function parameters when checking for type compatibility.0
and 1
, and enumeration constant definitions.precedence
,
which checks that expressions are parenthesized according to MISRA-C:2012 rule 12.1.identifier-unique-tag
) in case of forward-declared structs.identifier-unique-typedef
(rule X.B.3.5)
now reports the locations of both the typedef and the conflicting occurrence.identifier-hidden
now warns about hidden tags.
This affects rule X.A.5.14.octal-constant
,
octal-escape-sequence
,
simple-escape-sequence
, and
other-escape-sequence
for rule X.A.3.8
have been extended to preprocessing directives.