--help
.exit()
or a compound expression containing jump statements —
are not marked unreachable anymore.sizeof(&*a)
where a
is of type array
.The OS stubs for OSEK now provide more efficient implementations of the functions
EnableAllInterrupts
DisableAllInterrupts
SuspendAllInterrupts
ResumeAllInterrupts
SuspendOSInterrupts
ResumeOSInterrupts
In addition, the effect of these functions is now more precisely
captured by the analyzer when the new Process priority domain is enabled
(precise-priorities=yes
).
enum
tags
to allow the forward declaration of enums.type-compatibility
) and
MISRA-C:2012 Appendix 1 rule 21.15 (memory-function-compatible
).=
, e.g. -DEQ===
.#
and ##
.
The frontend now takes the original tokens of the argument
instead of the expanded ones if the parameter instance
is operand to one of the respective operators.#define B(X) X #define A B A(X)where a macro name
A
expands to another macro name
B
with the macro argument list for B
lying outside of the expansion result of A
.rounding_mode=to_nearest
,
the analysis might stop in some contexts when evaluating a guard expression
that involves a binary operation on floats.exclude-signed-in-unsigned-overflows
(“Do not raise overflow alarms on unsigned computations with signed values”),
the analyzer might crash in certain scenarios.The last two issues are fixed in Release 16.10 Patch 1 (build 271444).
The new Data Flow view in the Results area displays all data flow information collected by the analyzer. All accesses to global/static variables are shown, with information about whether they are shared or involved in a data race, what kind of access it is, and from which function or process it originates. The context menu in this view gives access to the corresponding code locations.
You can interactively query the data flow information based on a selection of relevant variables, functions, and processes. These queries are applied as filters to the Data Flow view. This is particularly helpful for identifying all processes and accesses contributing to a data race.
The Call Graph view can now show all possible call paths for accesses to global variables. This feature is activated in the Data Flow view via the context menu entries “Display in graph” and “Display variable in graph”. It is particularly useful when investigating shared variables and data race alarms.
__astree_create_process()
and
__astree_start_process()
instead of the
no longer supported __ASTREE_asynchronous_loop
directive. Consequently, the wrapper generator takes an optional
priority argument for tasks and task entry functions
can no longer take parameters.<report>
specification. Moreover, it is now possible to define and generate customized
HTML reports. For further details, see the Results tab
of these release notes.a->b
the GUI now displays not only a tooltip for the whole expression
a->b
but also for the sub-expression a
.
Moreover, it now also shows the values of indices in array accesses
(e.g. a[i]
) even if such expressions appear on the
left-hand side of assignments.__ASTREE_annotation
block.ExportAll
” is selected,
the GUI now also exports rules with parameters displayed as <empty>
./* Result summary */ ... Reached code: 98 % (51/52 statements reached, 45/51 (88 %) statements proven) ...A statement is proven if it is reached by the analysis and does not cause an error or an alarm of type A, B or C.
/* Filter patterns */ function: asm void identifier: __compiler_extension__ regexp: asm([^)]+); identifier: asm /* External declarations */ type: my_type; declaration: my_type my_function(my_type, int);
report-shared-variables
is now active by default.
/* Possibly shared variables */ 'Process' at osek_stub.c:890.20-27 | read/written in Process 0: Task1 | | read/written in Process 1: Task2 | | read in Process 2: Alarm1 | | read in Process 3: Alarm2 |
ALARM (D): lock operation can cause a deadlock (deadlock-cycle #1: process 0 locks 0, process 1 locks 1) at ...The deadlock cycles that these alarms belong to are displayed in the Output view of the GUI and in the text report:
ALARM (D): lock operation can cause a deadlock (deadlock-cycle #1: process 0 locks 0, process 1 locks 1) at ...
----- deadlock-cycle #1: ---------- [ at ... participant: [process 0, locked: {1} ] lock 0] [ at ... participant: [process 1, locked: {0} ] lock 1]A deadlock cycle is a list of processes in a given state trying to acquire a lock which is taken by another element of the list. Each element of the list is printed with relevant context information (call stack and position in the code where the lock is taken). The new alarms and output are disabled by default and can be activated by the new option
warn-on-deadlocks=yes
.ALARM (B): write-write data-race on atomic access in assignment 2 byte(s) at ...Alarm messages with the additional information “on atomic access” are exactly those data races that are not reported if the new option
warn-on-atomic-volatile-data-race
is disabled.Parsed X physical lines of preprocessed codewhere X is the number of preprocessed source lines containing at least one non-whitespace C token, excluding line directives and filtered code. This line is also contained in the text report file.
char* ptr = (char*)malloc(42); free(ptr); if (ptr != NULL) {results in the alarm message
ALARM (A): use of dangling pointer { DANGLING: <memory-block> } at <location>where <memory-block> is the internal name of the memory block that the pointer points to and <location> specifies the file, line and column number where the pointer is used.
&*e
and its
sub-expression e
. If both expressions raise alarms,
these alarms will no longer be coalesced to the same code location
for the purpose of counting alarms per code location.__ASTREE_log_vars
to use proper names. That is,
for code of the form
struct { char a:4; char b:4;} x; x.b = 2;the information for
x.b
is now displayed as x.b in {2}
.global iter #5
global iter #5 (widened)
<parser_ignore> <pattern type="function">foobar</pattern> <pattern type="identifier">foo</pattern> <pattern type="regexp">bar.*</pattern> <pattern type="pragma-asm">yes</pattern> </parser_ignore> <external_declarations> <external_declaration type="type">T;</external_declaration> <external_declaration type="declaration">T x;</external_declaration> </external_declarations>
analysis-run
fails.NOTE: translate_warning(type): conversion from floating-point to integer: from <TYPE> to <TYPE> at <LOCATION>has been removed. Instead we recommend activating the MISRA-C:2012 rule 10.3 or the MISRA-C:2004 rule 10.2.
data_races
attribute of the <summary>
tag.
(In certain rare cases, this number was too small.)if
statement that are not enclosed in brackets).Most of the supported MISRA rules can now be checked for without running
the runtime error analysis (skip-analysis=yes
):
skip-analysis
.controlling-invariant-expression
,
associated with MISRA-C:2004 rule 4.1 and MISRA-C:2012 rule 2.1,
provides a partial coverage for those rules without runtime error
analysis.uninitialized-variable-use
(rule 9.1 of both MISRA-C:2004 and MISRA-C:2012) checks
for missing initializers if the runtime error analysis
is disabled.error-information-unused | ⤙ | error-information-unused error-information-unused-computed |
shift-width | ⤙ | shift-width shift-width-constant |
essential-shift-width | ⤙ | essential-shift-width essential-shift-width-constant |
parameter-match | ⤙ | parameter-match parameter-match-computed |
boolean-invariant | ⤙ | boolean-invariant boolean-invariant-expression |
controlling-invariant | ⤙ | controlling-invariant controlling-invariant-expression |
max-arguments-macro
max-case-labels
max-condition-nesting
max-declarator-depth
max-declarator-nesting
max-enums
max-expression-nesting
max-externals
max-include-nesting
max-locals
max-logical-line-length
max-macros-defined
max-members
max-parameters
max-parameters-macro
max-statement-nesting
max-string-length
max-struct-nesting
parameters
switch-skipped-code
switch-clause-empty-compound
default: {}
function-return-type
has been moved
from rule 8.1 to rule 8.2.evaluation-order
for rule 12.2
is now also performed in initializer expressions.M2012A1
followed by the MISRA rule number.switch-skipped-code
switch-clause-empty-compound
default: {}
for-loop-condition-sideeffect
for the case when the third expression of a for-loop is missing.
This affects rule 14.2.side-effect-in-initializer-list
for initializer lists with a single element.
This affects rule 13.1.evaluation-order
for rule 13.2
is now also performed in initializer expressions.function-return-type
has been moved
from rule 8.2 to rule 8.1._Bool
type.unary-assign-detachment
in combination with volatile variables.The checks for the MISRA-C:2004 rules 11.4 and 11.5 and for the MISRA-C:2012 rules 11.3, 11.6, 11.7, and 11.8 have been extended to cover implicit conversions.
pointer-qualifier-cast-implicit
inappropriate-pointer-cast-implicit
object-pointer-diff-cast-implicit
object-pointer-diff-cast-strict-implicit
cast-pointer-void-arithmetic | ⤙ | cast-pointer-void-arithmetic cast-pointer-void-arithmetic-implicit |
pointer-qualifier-cast-implicit
to rule 1.1./* comment1 *//* comment2 * comment2 continued */
.edf
file. Here is an example
that shows the new DAX tags:
<external-declarations> <type>typeA</type> <type>typeB</type> <declaration>typeA f(int)</declaration> <declaration>typeB g(typeA, int)</declaration> </external-declarations>
.edf
files can still be imported.<abi> <sizeof_attributed_pointer_1>2</sizeof_attributed_pointer_1> <alignof_attributed_pointer_1>2</alignof_attributed_pointer_1> <atomic_attributed_pointer_1>no</atomic_attributed_pointer_1> <pointer_attributes_1>_near,_xnear</pointer_attributes_1> </abi>
ABI key | DAX tag |
---|---|
atomic_bool | <atomic_bool>yes|no</atomic_bool> |
atomic_char | <atomic_char>yes|no</atomic_char> |
atomic_short | <atomic_short>yes|no</atomic_short> |
atomic_int | <atomic_int>yes|no</atomic_int> |
atomic_long | <atomic_long>yes|no</atomic_long> |
atomic_long_long | <atomic_long_long>yes|no</atomic_long_long> |
atomic_float | <atomic_float>yes|no</atomic_float> |
atomic_double | <atomic_double>yes|no</atomic_double> |
atomic_long_double | <atomic_long_double>yes|no</atomic_long_double> |
atomic_pointer | <atomic_pointer>yes|no</atomic_pointer> |
atomic_function_pointer | <atomic_function_pointer>yes|no</atomic_function_pointer> |
parameters
attribute of the <task>
tag in the <wrapper>
section has been replaced by a new priority
attribute:
<wrapper> <task priority="50">Task0</task> <task priority="100">Task1</task> <execution-model>asynchronous</execution-model> </wrapper>
<report-configuration>
section that allows the definition of customized reports. The extension is defined
in a separate XML schema that is included by the XML schema for DAX. The schema
can be found at absint.com/dtd/astree-dax-report-configuration-16.10.xsd.
AbsIntAnalysisResults
element of the function
instead of writing to the function’s properties directly.Progress: [13:45:13]: Processing DAX... Progress: [13:45:13]: Importing... [...] Progress: [13:45:14]: Analyzing... Progress: [13:45:30]: Analysis done...
Modified the interpretation of preprocessing configurations w.r.t. the use of relative paths as their base directory. Such paths are now extended by prepending the base directories of all parent configurations up to the global base directory. This path extension terminates at the first base directory that is specified as an absolute path. Example:
<base>C:/tmp/my_code/</base> <config name="libs"> <base>lib</base> <config name="extra files"> <base>extra</base> <files> <file>file.c</file> </files> </config> </config>
This DAX configuration specifies the following file for preprocessing:
C:/tmp/my_code/lib/extra/file.c
The same path extension is also applied to include paths and is also performed when configuring the preprocessor in the GUI.
precise-priorities
(default no
)warn-on-deadlocks
(default no
)warn-on-atomic-volatile-data-race
(default yes
)no
, no data race will be reported for accesses
to memory through lvalues that are qualified as volatile and have a type
declared as atomic in the ABI specifications. This is particularly useful
for analyzing lock-free implementations of concurrent behavior.at-location
(enabled by default)@<address>
declarations (compiler extension) for data placement at an absolute location.
If enabled, the analyzer considers the following declaration
int i @0x1234;to be equivalent to
int i; __ASTREE_absolute_address((i, 0x1234));That is, the declared variable is known to be allocated to the given absolute address. The address can also be specified as a constant expression.
bitfield-data-race-enclosing-bytes-only=no
,
bitfield accesses are considered to interact with all bitfields
contained within the boundaries of the type used in their definition.automatic-shared-variables
constant-propagation
simplify
option is enabled. That is, simplify=yes
now behaves like simplify=yes constant-propagation=yes
in earlier releases.partition-pt1
now takes an integer value
as argument instead of the previous yes/no
.
The integer value specifies into how many partitions
the values of PT1 filters are divided by the analyzer.
The default value is 3
, which was the value
used with partition-pt1=yes
in earlier Astrée releases.
Values less than 2
disable partitioning of PT1 filters.
Values greater than 3
increase precision
up to a certain limit. When converting old analysis projects
or importing them via AAF or DAX, the old value yes
is automatically converted into 3
, while no
is converted into 0
.stop-parse-error-immediate
has been changed to no
, i.e. the option is now disabled by default.stop-parse-error-immediate=no
,
parse errors no longer stop the rule checking on preprocessed
files completely. Instead it is performed on all successfully parsed files.__ASTREE_asynchronous_loop
and __ASTREE_shared_variable
are not supported anymore.
Asynchronous tasks should be declared using __astree_create_process
and __astree_start_process
.__ASTREE_known_range
now accepts parenthesized expressions again:
__ASTREE_known_range(( (*p)[], [0;100] ));This was temporarily unsupported in release 16.04.
__ASTREE_absolute_address
directive
now accepts not only constants but also constant expressions
as absolute addresses.__ASTREE_absolute_address
directive, the analyzer no longer stops. Instead it reports the error
and carries on with the analysis. The invalid directive is ignored.__ASTREE_absolute_address
directive was unintentionally accepted in function scope
(and ignored for function local variables). It is now strictly
rejected in function scope and only allowed on the global level as documented.sizeof_attributed_pointer_1
alignof_attributed_pointer_1
atomic_attributed_pointer_1
pointer_attributes_1
__near
, __xnear
,
__far
, __huge
,
and __shuge
attributes for pointers.atomic_
to a basic data type,
e.g. atomic_bool
, atomic_char
,
atomic_short
. Information about atomically
accessible data types has been added to the pre-defined
ABIs where appropriate.Fixed the following known issues:
rounding_mode=to_nearest
,
older builds of the analyzer might stop in some contexts when evaluating
a guard expression that involves a binary operation on floats.exclude-signed-in-unsigned-overflows
(“Do not raise overflow alarms on unsigned computations with signed values”),
older builds of the analyzer might crash in certain scenarios.