A software bug (or just "bug") is an error, flaw, mistake, failure, fault or "undocumented feature" in a computer program that prevents it from behaving as intended (e. Failure ( fail, phail or flop) in general refers to the state or Condition of not meeting a desirable or intended objective In document ISO/CD 10303-226, a fault is defined as an abnormal condition or defect at the component equipment or sub-system level which may lead to a Failure. Computer programs (also software programs, or just programs) are instructions for a Computer. g. , producing an incorrect result). Most bugs arise from mistakes and errors made by people in either a program's source code or its design, and a few are caused by compilers producing incorrect code. In Computer science, source code (commonly just source or code) is any sequence of statements or declarations written in some Human-readable The software architecture of a program or computing system is the structure or structures of the system, which comprise software components the externally visible properties A compiler is a Computer program (or set of programs that translates text written in a computer language (the source language) into another A program that contains a large number of bugs, and/or bugs that seriously interfere with its functionality, is said to be buggy. Reports detailing bugs in a program are commonly known as bug reports, fault reports, problem reports, trouble reports, change requests, and so forth.
Contents |
Bugs can have a wide variety of effects, with varying levels of inconvenience to the user of the program. Many Software bugs are merely annoying or inconvenient but some can have extremely serious consequences - either financially or as a threat to human well-being Some bugs have only a subtle effect on the program's functionality, and may thus lie undetected for a long time. More serious bugs may cause the program to crash or freeze leading to a denial of service. A crash in Computing is a condition where a program (either an application or part of the Operating system) stops performing its expected function and also This article is about the computer malfunction called hanging. Others qualify as security bugs and might for example enable a malicious user to bypass access controls in order to obtain unauthorized privileges. A security bug is a Software bug that benefits someone other than intended beneficiaries in the intended ways A black hat is the Villain or bad guy, especially in a western movie in which such a character would wear a black Hat in contrast to the Access control is the ability to permit or deny the use of a particular resource by a particular entity
The results of bugs may be extremely serious. A bug in the code controlling the Therac-25 radiation therapy machine was directly responsible for some patient deaths in the 1980s. The Therac-25 was a Radiation therapy Machine produced by Atomic Energy of Canada Limited (AECL and CGR MeV of France after the Radiation therapy (or radiotherapy) is the medical use of Ionizing radiation as part of Cancer treatment to control Malignant In 1996, the European Space Agency's US$1 billion prototype Ariane 5 rocket was destroyed less than a minute after launch, due to a bug in the on-board guidance computer program. The European Space Agency ( ESA) established in 1975 is an intergovernmental organisation dedicated to the exploration of space, currently with 17 member Ariane 5 is a European Expendable launch In June 1994, a Royal Air Force Chinook crashed into the Mull of Kintyre, killing 29. WikipediaWikiProject Aircraft. Please see WikipediaWikiProject Aircraft/page content for recommended layout This was initially dismissed as pilot error, but an investigation by Computer Weekly uncovered sufficient evidence to convince a House of Lords inquiry that it may have been caused by a software bug in the aircraft's engine control computer. ComputerWeekly is a weekly magazine for IT professionals which has been published by Reed Business Information for over 40 years The House of Lords is the second house of the Parliament of the United Kingdom and is also commonly referred to as "the Lords" A FADEC (Full Authority Digital Engine Control is a system consisting of a Digital Computer, called an Electronic Engine Control (EEC or Electronic Control [1]
The concept that software might contain errors dates back to 1842 in Ada Byron's notes on the analytical engine in which she speaks of the difficulty of preparing program 'cards' for Charles Babbage's Analytical engine:
| “ | . Ada Byron's notes on the analytical engine are a description and associated documents produced by Augusta Ada King Countess of Lovelace, (born Ada Byron on Charles Babbage The analytical engine, an important step in the History of computers, was the design of a mechanical general-purpose Computer by the British mathematician Charles . . an analyzing process must equally have been performed in order to furnish the Analytical Engine with the necessary operative data; and that herein may also lie a possible source of error. Granted that the actual mechanism is unerring in its processes, the cards may give it wrong orders. | ” |
Usage of the term "bug" to describe inexplicable defects has been a part of engineering jargon for many decades and predates computers and computer software; it may have originally been used in hardware engineering to describe mechanical malfunctions. For instance, Thomas Edison wrote the following words in a letter to an associate in 1878:
| “ | It has been just so in all of my inventions. Year 1878 ( MDCCCLXXVIII) was a Common year starting on Tuesday (link will display the full calendar of the Gregorian calendar (or a Common The first step is an intuition, and comes with a burst, then difficulties arise—this thing gives out and [it is] then that 'Bugs'—as such little faults and difficulties are called—show themselves and months of intense watching, study and labor are requisite before commercial success or failure is certainly reached. [2] | ” |
Problems with radar electronics during World War II were referred to as bugs (or glitches), and there is additional evidence that the usage dates back much earlier.
The invention of the term is often erroneously attributed to Grace Hopper, who publicized the cause of a malfunction in an early electromechanical computer[3] . Rear Admiral Grace Murray Hopper ( December 9 1906 – January 1 1992) was an American Computer scientist and United A typical version of the story is given by this quote:
| “ | In 1946, when Hopper was released from active duty, she joined the Harvard Faculty at the Computation Laboratory where she continued her work on the Mark II and Mark III. Operators traced an error in the Mark II to a moth trapped in a relay, coining the term bug. This bug was carefully removed and taped to the log book September 9th 1945 [sic]. Events 1000 - Battle of Svolder, Viking Age. 1379 - Treaty of Neuberg, splitting the Austrian Year 1945 ( MCMXLV) was a Common year starting on Monday (link will display the full calendar Stemming from the first bug, today we call errors or glitches [sic] in a program a bug. [4] | ” |
Hopper was not actually the one who found the insect, as she readily acknowledged. And the date was September 9, but in 1947, not 1945. Events 1000 - Battle of Svolder, Viking Age. 1379 - Treaty of Neuberg, splitting the Austrian Year 1947 ( MCMXLVII) was a Common year starting on Wednesday (link will display full 1947 calendar of the Gregorian calendar. [5][6] The operators who did find it (including William "Bill" Burke, later of the Naval Weapons Laboratory, Dahlgren Va. [7]), were familiar with the engineering term and, amused, kept the insect with the notation "First actual case of bug being found. " Hopper loved to recount the story. [8]
While it is certain that the Mark II operators did not coin the term "bug", it has been suggested that they did coin the related term, "debug". The Harvard Mark II was an electromechanical computer built at Harvard University under the direction of Howard Aiken and was finished in 1947 Even this is unlikely, since the Oxford English Dictionary entry for "debug" contains a use of "debugging" in the context of airplane engines in 1945 (see the debugging article for more). The Oxford English Dictionary ( OED) published by the Oxford University Press (OUP is a comprehensive Dictionary of the English
Bugs are a consequence of the nature of human factors in the programming task. See also The Human Factor (disambiguation. Human factors is a term that covers The science of understanding the properties They arise from oversights made by computer programmers during design, coding and data entry. A programmer is someone who writes Computer software. The term computer programmer can refer to a specialist in one area of computer programming or to a generalist For example: In creating a relatively simple program to sort a list of words into alphabetical order, one's design might fail to consider what should happen when a word contains a hyphen. A hyphen ( -) is a Punctuation mark It is used for both Words to join and to separate Syllables It is often confused with the dashes Perhaps, when converting the abstract design into the chosen programming language, one might inadvertently create an off-by-one error and fail to sort the last word in the list. An off-by-one error (OBOE is a logical error involving the discrete equivalent of a Boundary condition. Finally, when typing the resulting program into the computer, one might accidentally type a '<' where a '>' was intended, perhaps resulting in the words being sorted into reverse alphabetical order. More complex bugs can arise from unintended interactions between different parts of a computer program. This frequently occurs because computer programs can be complex - millions of lines long in some cases - often having been programmed by many people over a great length of time, so that programmers are unable to mentally track every possible way in which parts can interact. Another category of bug called a race condition comes about either when a process is running in more than one thread or two or more processes run simultaneously, and the exact order of execution of the critical sequences of code have not been properly synchronized. A race condition or race hazard is a flaw in a System or process whereby the output and/or result of the process is unexpectedly and critically dependent A thread in Computer science is short for a thread of execution.
The software industry has put much effort into finding methods for preventing programmers from inadvertently introducing bugs while writing software. [9][10] These include:
Finding and fixing bugs, or "debugging", has always been a major part of computer programming. Maurice Wilkes, an early computing pioneer, described his realization in the late 1940s that much of the rest of his life would be spent finding mistakes in his own programs. The 1940s decade ran from 1940 to 1949 Events and trends The 1940s was a period between the radical 1930s and the conservative 1950s which also leads the period to be As computer programs grow more complex, bugs become more common and difficult to fix. Often programmers spend more time and effort finding and fixing bugs than writing new code.
Usually, the most difficult part of debugging is locating the erroneous part of the source code. In Computer science, source code (commonly just source or code) is any sequence of statements or declarations written in some Human-readable Once the mistake is found, correcting it is usually easy. Programs known as debuggers exist to help programmers locate bugs. A debugger is a Computer program that is used to test and Debug other programs However, even with the aid of a debugger, locating bugs is something of an art. It is not uncommon for a bug in one section of a program to cause failures in a completely different section, thus making it especially difficult to track (for example, an error in a graphic rendering routine causing a file I/O routine to fail); this is most commonly caused by errors that lead to the corruption of program instructions or variables in memory. Rendering is the process of generating an image from a model, by means of computer programs In Computing, input/output, or I/O, refers to the communication between an Information processing system (such as a Computer) and the outside
Typically, the first step in locating a bug is finding a way to reproduce it easily. Once the bug is reproduced, the programmer can use a debugger or some other tool to monitor the execution of the program in the faulty region, and find the point at which the program went astray. Sometimes, a bug is not a single flawed instruction, but represents an error of thinking or planning on the part of the programmer. Such logic errors require a section of the program to be overhauled or rewritten. In Computer programming, a logic error (sometimes called a semantic error) is a bug in a program that causes it to operate incorrectly but not to
It is not always easy to reproduce bugs. Some bugs are triggered by inputs to the program which may be difficult for the programmer to re-create. One cause of the Therac-25 radiation machine deaths was a bug that occurred only when the machine operator very rapidly entered a treatment plan; it took days of practice to become able to do this, so the bug did not manifest in testing or when the manufacturer attempted to duplicate it. The Therac-25 was a Radiation therapy Machine produced by Atomic Energy of Canada Limited (AECL and CGR MeV of France after the Other bugs may disappear when the program is run with a debugger; these are heisenbugs (humorously named after the Heisenberg uncertainty principle. Unusual software bugs are a class of Software bugs that are considered exceptionally difficult to understand and repair In Quantum physics, the Heisenberg uncertainty principle states that locating a particle in a small region of space makes the Momentum of the particle uncertain )
Debugging is still a tedious task requiring considerable manpower. Since the 1990s, particularly following the Ariane 5 Flight 501 disaster, there has been a renewed interest in the development of effective automated aids to debugging. Flight 501, which took place on June 4, 1996, was the first and unsuccessful test flight of the European Ariane 5 Expendable launch system. For instance, methods of static code analysis by abstract interpretation have already made significant achievements, while still remaining much of a work in progress. Static code analysis is the analysis of computer Software that is performed without actually executing programs built from that software (analysis performed on executing In Computer science, abstract interpretation is a theory of sound approximation of the Semantics of computer programs based on Monotonic functions
It is common practice for software to be released with known bugs that are considered non-critical. While software products contain an unknown number of unknown bugs when shipped, measurements during the testing may provide a statistically reliable estimate of the number of likely bugs remaining. Most big software projects maintain a list of "known bugs". This list inform users about bugs that are not fixed in the current release, or not fixed at all, and often a workaround is offered additionally. A workaround is a bypass of a recognized problem in a system A workaround is typically a temporary fix that implies that a genuine solution to the problem is needed
There are various reasons for such a list:
Given the above, it is often considered impossible to write completely bug-free software of any real complexity. So bugs are categorized by severity, and low-severity non-critical bugs are tolerated, as they do not impact the proper operation of the system, for the majority of users. NASA's SATC managed to reduce number of errors to fewer than 0. The Software Assurance Technology Center (SATC is a NASA department founded in 1992 as part of their Systems Reliability and Safety Office at GSFC. 1 per 1000 lines of code (SLOC) but this was not felt to be feasible for any real world projects.
One school of thought, popularized by Eric S. Raymond as Linus's Law in his essay The Cathedral and the Bazaar, holds that popular open-source software holds a better chance of having few or no bugs than other software, because "given enough eyeballs, all bugs are shallow". Eric Steven Raymond (born December 4 1957 often referred to as ESR, is a Computer programmer, author and Open source software advocate Linus's Law can refer to two different notions both named after Linus Torvalds. The Cathedral and the Bazaar (abbreviated CatB) is an essay by Eric S Open source software (OSS began as a marketing campaign for Free software. [11] This assertion has been disputed, however: computer security specialist Elias Levy wrote that "it is easy to hide vulnerabilities in complex, little understood and undocumented source code," because, "even if people are reviewing the code, that doesn't mean they're qualified to do so. Elias Levy (also known as Aleph One) was the moderator of the Full disclosure vulnerability mailing list Bugtraq from May 14 1996 "[12]
Malicious software may attempt to exploit known vulnerabilities in a system - which may or may not be bugs. Malware, a Portmanteau word from the words '''mal'''icious and soft'''ware''', is software designed to infiltrate or damage a computer system without Viruses are not bugs in themselves - they are typically programs that are doing precisely what they were designed to do. However, viruses are occasionally referred to as such in the popular press.