Software bug is an error, flaw or fault in a computer program or system that causes it to produce an incorrect or unexpected result, or to behave in unintended ways.
While the use of the term “bug” to describe software errors is common, many have suggested that it should be abandoned.
One argument is that the word “bug” is divorced from a sense that a human being caused the problem, and instead implies that the defect arose on its own, leading to a push to abandon the term “bug” in favor of terms such as “defect”, with limited success.
The process of finding and fixing bugs is termed “debugging” and often uses formal techniques or tools to pinpoint bugs, and since the 1950s, some computer systems have been designed to also deter, detect or auto-correct various computer bugs during operations.
Most bugs arise from mistakes and errors made in either a program’s design or its source code, or in components and operating systems used by such programs. A few are caused by compilers producing incorrect code.
A program that contains many bugs, and/or bugs that seriously interfere with its functionality, is said to be buggy (defective). Bugs can trigger errors that may have ripple effects. Bugs may have subtle effects or cause the program to crash or freeze the computer.
Other bugs qualify as security bugs and might, for example, enable a malicious user to bypass access controls in order to obtain unauthorized privileges.
A number of software bugs have become well-known, usually due to their severity: examples include various space and military aircraft crashes. Possibly the most famous bug is the Year 2000 problem, also known as the Y2K bug, in which it was feared that worldwide economic collapse would happen at the start of the year 2000 as a result of computers thinking it was 1900.
Some software bugs have been linked to disasters. Bugs in code that controlled the Therac-25 radiation therapy machine were directly responsible for patient deaths in the 1980s.
In 1996, the European Space Agency’s US$1 billion prototype Ariane 5 rocket had to be destroyed less than a minute after launch due to a bug in the on-board guidance computer program.
In June 1994, a Royal Air Force Chinook helicopter crashed into the Mull of Kintyre, killing 29.
In 2002, a study commissioned by the US Department of Commerce’s National Institute of Standards and Technology concluded that “software bugs, or errors, are so prevalent and so detrimental that they cost the US economy an estimated $59 billion annually, or about 0.6 percent of the gross domestic product”.