And more technical information: https://www.safetyresearch.net/Library/BarrSlides_FINAL_SCRU...
Toyota and lexus sometimes have the gas pedal hinged on the floor panel, rather than suspended from piece of metal from up above. If you swap out the stock floor mats for ones not designed with this in mind, during a hard brake your feet can move forward, jamming the floor mat into the accelerator and causing the engine to receive more fuel.
If you'd like a picture, i can go take a picture of the accelerator pedal in my lexus from 2012, and the floor mats which are all but bolted down to prevent this from happening.
as a side note i prefer the hinged design because there's less distance to traverse, i just wish the brake was the same way!
However, Toyota got convicted because their software development process was so terrible that they were effectively criminally negligent and deserved to get absolutely roasted for it.
Well, civil reckless disregard, as it wasn’t a criminal case.
Mostly you have specific inputs from some other tasks and your outputs are consumed by different tasks. So, even though the variables are "global" they generally only have one writer with multiple readers in properly done embedded programming.
What Toyota did was not even in the same universe as "properly done embedded".
It wasn't just one thing. It was a near complete and total disregard for the fact that they were writing code for machines that could kill people.
One person messed up and crashed their Prius claiming the accelerator got stuck and it got picked up by the news. That story then primed other people to start looking for that and from then on anytime a Prius crashed people were looking to blame the accelerator. More people reported their Priuses accelerating out of control which then reinforced the idea even more and so on and so on.