Check for integer overflow
R2026bCheck ID:
mathworks.sldv.integeroverflow
Detects integer or fixed-point data overflow errors in your model.
Description
This check identifies operations that exceed the data type range for integer or fixed-point operations.
Following the recommendations of this check increases the likelihood of generating MISRA C:2012 compliant code for embedded applications, as well as code that complies with the CERT® C, CWE™, and ISO/IEC TS 17961 standards.
Results and Recommended Actions
| Result | Recommended Action |
|---|---|
| Failed, model incompatible | Resolve the model incompatibility. See
Also see Handle Model Complexities with Automatic Stubbing (Simulink Design Verifier). |
| Integer overflow found in model | To view the conditions that cause the integer overflow, create a harness model. When you simulate the harness with the given inputs, it replicates the error. Click View test case in the Model Advisor report. |
Capabilities and Limitations
Does not run on library models.
Analyzes content in masked subsystems. The input parameter Look inside masks is always set to
all. You can use a filter to exclude specific subsystems. For more information, see Filter Objectives by Using Simulink Design Verifier Filter Explorer (Simulink Design Verifier).Analyzes content of library-linked blocks. The input parameter Follow links is always set to
on.Does not support exclusions.
See Also
MISRA C:2012: Directive 4.1
ISO/IEC TS 17961: 2013, intoflow
CERT C, INT30-C and INT32-C
CWE, CWE-190
Secure Coding (Embedded Coder)
Detect and Address Bugs (Simulink Design Verifier)
Detect Integer Overflow and Division-by-Zero Errors (Simulink Design Verifier)