Skip to content

Instantly share code, notes, and snippets.

@kn9ts
Created February 22, 2017 10:31
Show Gist options
  • Save kn9ts/e4c7ad9ac01a294092a6dcd32205756f to your computer and use it in GitHub Desktop.
Save kn9ts/e4c7ad9ac01a294092a6dcd32205756f to your computer and use it in GitHub Desktop.

In software development projects, a "mistake" or "fault" may be introduced at any stage. Bugs arise from oversights or misunderstandings made by a software team during specification, design, coding, data entry or documentation.

Conceptual errors are a developer's misunderstanding of what the software must do. The resulting may perform according to the developer's understanding, but not what is really needed.

Other types:

Arithmetic

  • Division by zero.
  • Arithmetic overflow or underflow.
  • Loss of arithmetic precision due to rounding or numerically unstable algorithms.

Logic

  • Infinite loops and infinite recursion.
  • Off-by-one error, counting one too many or too few when looping.

Syntax

  • Use of the wrong operator, such as performing assignment instead of equality test. For example, in some languages x=5 will set the value of x to 5 while x==5 will check whether x is currently 5 or some other number. Interpreted languages allow such code to fail. Compiled languages can catch such errors before testing begins.

Resource

  • Null pointer dereference.
  • Using an uninitialized variable.
  • Using an otherwise valid instruction on the wrong data type (see packed decimal/binary coded decimal).
  • Access violations.
  • Resource leaks, where a finite system resource (such as memory or file handles) become exhausted by repeated allocation without release.
  • Buffer overflow, in which a program tries to store data past the end of allocated storage. This may or may not lead to an access violation or storage violation. These bugs may form a security vulnerability.
  • Excessive recursion which — though logically valid — causes stack overflow.
  • Use-after-free error, where a pointer is used after the system has freed the memory it references.
  • Double free error.

Multi-threading

  • Deadlock, where task A can't continue until task B finishes, but at the same time, task B can't continue until task finishes.
  • Race condition, where the computer does not perform tasks in the order the programmer intended.
  • Concurrency errors in critical sections, mutual exclusions and other features of concurrent processing. Time-of-check-to-time-of-use (TOCTOU) is a form of unprotected critical section.

Interfacing

  • Incorrect API usage.
  • Incorrect protocol implementation.
  • Incorrect hardware handling.
  • Incorrect assumptions of a particular platform.
  • Incompatible systems. Often a proposed "new API" or new communications protocol may seem to work when both computers use the old version or both computers use the new version, but upgrading only the receiver exposes backward compatibility problems; in other cases upgrading only the transmitter exposes forward compatibility problems. Often it is not feasible to upgrade every computer simultaneously—in particular, in the telecommunication industry[29] or the internet. Even when it is feasible to update every computer simultaneously, sometimes people forget to update every computer.

Performance

-Too high computational complexity of algorithm.

  • Random disk or memory access.

Teamworking

  • Unpropagated updates; e.g. programmer changes "myAdd" but forgets to change "mySubtract", which uses the same algorithm. These errors are mitigated by the Don't Repeat Yourself philosophy. Comments out of date or incorrect: many programmers assume the comments accurately describe the code.
  • Differences between documentation and product.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment