It actually happened with Toyota around 2010: they went into a settlement regarding an unintended acceleration issue because it was proven the code was terrible and a single bit-flip could cause the behaviour.
https://en.wikipedia.org/wiki/2009%E2%80%932011_Toyota_vehic...