Non-compliance with AUTOSAR specification
An RTE API function is used with arguments that violate the AUTOSAR standard specification
Since R2021a
Description
This defect occurs when you use an RTE API function with arguments that violate the AUTOSAR standard specifications.
For instance, checks on Rte_Write_*
or Rte_Byps_Write_*
function calls determine if the pointer-to-data argument in the call:
Is NULL valued.
Points to a memory buffer.
Points to an initialized memory buffer.
For buffers with enum values, values are within the enum range.
For more information on the RTE API specifications, see AUTOSAR documentation (Specification of RTE Software).
To enable this check, use the value autosar
for the option Libraries used (-library)
.
A more exhaustive version of the same checker is available with Code Prover. When checking
for AUTOSAR standard violations on an Rte_
function call, the Code Prover
checker considers all execution paths that lead to the function call
(subject to verification assumptions).
Risk
The RTE function usage might lead to run-time errors.
Fix
The fix depends on the root cause of the defect. To diagnose this check, read the message on the Result Details pane. The message shows all checks performed on the RTE API function, along with information about whether the check passed. For instance, this message:
Shows the results of three checks, all three of which might fail. The first argument of the function might be a null pointer, might not be allocated and might not point to initialized memory.
Investigate the root cause of the issue further.
Examples
Result Information
Group: Programming |
Language: C | C++ |
Default: Off |
Command-Line Syntax:
autosar_lib_non_compliance |
Impact: High |
Version History
Introduced in R2021a
See Also
Topics
- Interpret Bug Finder Results in Polyspace Desktop User Interface
- Interpret Bug Finder Results in Polyspace Access Web Interface (Polyspace Access)
- Address Results in Polyspace User Interface Through Bug Fixes or Justifications
- Address Results in Polyspace Access Through Bug Fixes or Justifications (Polyspace Access)