Polyspace (either bug finder or code prover) is capable of detecting overflow on iteration variable?
Show older comments
I have a compiler reported bug stating that a loop may iterate more than expected. It is quite a corner case, but when dealing with ISO26262, corner cases need to be taken into consideration. Now I wonder if Polyspace could help to anticipate the issue. Would it detect and report about an overflow in the following code construct:
for (uint8_t i=100;i>1;i+=255) do_something();
Accepted Answer
More Answers (0)
Categories
Find more on IEC Certification Kit (for ISO 26262 and IEC 61508) in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!