know what is Software bug and types Maths Logic Syntax Resource Co-programming Teamworking etc.
Common types of computer bugs
Conceptual error (code is syntactically correct, but the programmer or designer intended it to do something else)
- Division by zero
- Arithmetic overflow or underflow
- Loss of arithmetic precision due to rounding or numerically unstable algorithms
- Infinite loops and infinite recursion
- Off by one error, counting one too many or too few when looping
Use of the wrong operator, such as performing assignment instead of equality test. In simple cases often warned by the compiler; in many languages, deliberately guarded against by language syntax
- Null pointer dereference
- Using an uninitialized variable
- Access violations
- Resource leaks, where a finite system resource such as memory or file handles are 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. These bugs can form a security vulnerability.
- Excessive recursion which though logically valid causes stack overflow
- Race condition
- 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.
- 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 the actual product