I'm curious if there have been notable instances where a CPU instruction set had bugs that caused unintended behavior in machine code instructions. Such issues could potentially have severe consequences since they would affect any programming language compiled for that architecture, and fixing them might require replacing the CPU across all affected machines. Have there been real cases of this happening, and how do manufacturers test to prevent such bugs from slipping through?
5 Answers
There's also the issue where some CPUs could have individual defects rather than a widespread bug. In large data centers, encountering a CPU with a minor fault isn't uncommon, but it's usually not a big deal for personal users.
Yes, bugs in CPU instruction sets have occurred before. Besides the Pentium issue, there's also the Spectre and Meltdown vulnerabilities that exposed deeper flaws in CPU designs rather than being direct bugs. While some errors can be mitigated with microcode updates, critical issues often lead to hardware recalls.
Bugs can exist not just in well-known CPUs but also in various microcontrollers, especially low-end ones. They often publish errata sheets to indicate problems and potential workarounds. The first chip produced by Raspberry Pi, for example, had a buggy ADC but was later updated to fix that.
Absolutely, one of the most infamous cases is the Pentium FDIV bug from the early Intel Pentium processors. This bug caused incorrect results from certain floating-point division calculations due to errors in a lookup table, which was discovered back in 1994. It led to significant inaccuracies in calculations and required a huge recall to address the issue.
Chip designs can indeed have a lot of errors, which is why manufacturers use exhaustive testing before production. They often invest heavily in simulation tools and formal methods to minimize risks. If a serious bug is found post-production, the fixes can be incredibly costly.

Related Questions
Lenovo Thinkpad Stuck In Update Loop Install FilterDriverU2_Reload