News for hackers. Stuff that matters.
Re:A case study of Toyota unintended acceleration and softwa... by monocasa on Monday May 02, 2022 @12:42PM (#31237482)
The rumor I heard at the time was that large portions of the code were autogenned out of a Matlab model of the engine, and that was where the globals and awful code complexity metrics came from.
Re:A case study of Toyota unintended acceleration and softwa... by stefan_ on Monday May 02, 2022 @09:35PM (#31243329)
Yep. This is widespread practice in the industry and is arguably far superior to someone actually trying to model it all in C. It just looks weird in a disassembler because you end up with a million global variables and essentially no control flow.

(It's specifically Matlab Simulink for those playing along at home)

Re:A case study of Toyota unintended acceleration and softwa... by chillingeffect on Tuesday May 03, 2022 @08:15AM (#31247340)
Ive exported several simulink models. Long functions, yes. Globals, no.
Re:A case study of Toyota unintended acceleration and softwa... by monocasa on Tuesday May 03, 2022 @11:02AM (#31249197)
I've integrated several simulink models; they had an incredible amount of globals.