You get a bonus - 1 coin for daily activity. Now you have 1 coin

9.5 Bug and programming errors

Lecture



Bug

In programming, a bug (the bug is the primary meaning: bug, any insect, virus ) is a slang word, usually indicating an error in a program or system, due to which the program produces unexpected behavior and, as a result, a result. Most of the bugs are due to errors made by the developers of the program in its source code, or in its design. Also, some bugs are caused by the incorrect operation of the compiler, generating incorrect code. A program that contains a large number of bugs and / or bugs that seriously limit its performance is called unstable or, in a slang language, “buggy”, “buggy”, “buggy”, “bounce”, “bug (a) chick”).

The term “bug” is usually used in relation to errors that manifest themselves at the stage of the program, in contrast to, for example, design errors or syntax errors. A report containing information about the bug is also called a bug report or a problem report (eng. Bug report ). Report on a critical problem (eng. Crash ), causing a program crash, called crash report (eng. Crash report ).

"Bugs" are localized and eliminated in the process of testing and debugging programs.

The etymology of the term "bug"

9.5 Bug and programming errors
Record in the tehn.zhurnale

There is a widespread legend that on September 9, 1945, scientists at Harvard University, who tested the Mark II Aiken Relay Calculator computer, found a moth stuck between the contacts of an electromechanical relay and Grace Hopperper made the term. The removed insect was glued in with a scotch tape in a technical diary, with the accompanying inscription: “First actual case of bug being found” (“the first real case when a bug was found”). It is believed that this funny fact initiated the use of the word "debugging" in the meaning of "debugging the program", however, most likely, the phrase is a gamburbo.

In fact, this incident occurred on September 9, 1947, and not in 1945. The word “bug” in the modern sense was used *** long before that by the personnel of telegraph and telephone companies in relation to problems with electrical equipment and radio engineering. During the Second World War, the word "bugs" called problems with radar electronics. In 1878, Thomas Edison wrote:

This was repeated again and again with all my inventions. The first step was intuition, an outbreak followed, then obstacles arose - and they disappeared, then Bugs arose - so are small shortcomings and difficulties - and months of constant search, research and hard work are needed before success or failure [1] .

Meaning and classification of software errors

Depending on the software development stage, the error is detected:

  • syntax errors (recognized as such by the translator and making compilation impossible) —for example, the absence or inconsistency of the opening and closing parentheses;
  • warnings (warnings) of the compiler - for example, using an uninitialized variable. In this case, the compiler may notice that the programmer is doing something unusual (probably incorrect), and reports this, but the programmer himself decides to ignore the message or not;
  • run-time errors, semantic errors (semantic) - for example, subtracting variables instead of adding or segmentation error.

To size:

  • Showstoppers;
  • Serious;
  • Minor bugs;

By the time of appearance:

  • Constantly, every time you start;
  • Sometimes ("floating" type);
  • Only on the client’s machine (depends on the client’s local settings);

By location and direction:

  • User interface errors;
  • Error handling systems;
  • Errors related to boundary conditions;
  • Calculation errors;
  • Flow control errors;
  • Processing or interpretation errors;
  • With the situation of "racing";
  • Increased load;
  • Version control and identifier errors;
  • Testing errors;

Depending on the nature of the error, the program and the execution environment, the error may appear immediately or vice versa - for a long time to go unnoticed (for example, Problem 2038).

An error may also manifest itself in the form of a vulnerability that makes unauthorized access to the system or a DoS attack possible.

Search and correction of errors

To debug a program (English debugging ), software developers use special debugger programs (English debugger ). For example, in the Windows operating system, you can use the WinDbg program from the Microsoft Debugging Tools for Windows package. For GNU / Linux and a number of other UNIX-like operating systems, there is a GDB debugger (GNU Debugger).

Bug reports

The bulk of the bugs are usually debugged during the compilation and testing of the program. However, some of the errors still get released and manifest on end-user computers during software operation. To improve the quality of the software, special programs are used, the purpose of which is to catch an error in the target application, collect the necessary information about its symptoms and send a report on the Internet to the developers of this software.

For example, the Dr.Ware utility is built into the Windows operating system. Watson, which by default catches errors in user applications and sends a report to a special Microsoft server. Also, as an example, similar libraries Breakpad [2] and CrashRpt [3] can be given .

see also

  • Error report
  • Bug tracking system
  • Feature
  • Borbag ​​- easily detectable stable bug
  • Heisenbag is a difficult to detect, periodically disappearing and changing properties of a bug when trying to detect it
  • Mandelbag - a bug with a very complex, chaotic, behavior
  • Shredinbag is a critical error that does not manifest until someone hits it in the source code, after which the program completely stops working
  • Gigo
  • Catastrophe Ariane 5 (June 4, 1996) - one of the most expensive computer bugs in history.
  • Errors in the software of the Therac-25 medical accelerator led to an excess of radiation doses to several people.


Comments


To leave a comment
If you have any suggestion, idea, thanks or comment, feel free to write. We really value feedback and are glad to hear your opinion.
To reply

Informatics

Terms: Informatics