Sunday, August 31, 2014

Technical hide and seek: Recursion is....?

 Joke: "To understand recursion, you must understand recursion."

Barr said on the stand in Bookout:

"There are some recursive functions in Toyota source code that are not appropriate in safety critical systems."

"Not only was stack usage up to 94% in normal operation, the code was recursive! Recursive code is generally avoided in embedded applications because it is harder to demonstrate that it has a good chance of working reliably. MISRA - the Motor Industry Software Reliability Association - has a rule that explicitly forbids recursion. Toyota claimed it followed MISRA standards but more than 80,000 violations were found."