errors (counting one too many or one too few iterations when looping). Interfacing Incorrect API usage. Incorrect protocol implementation. Incorrect hardware handling. Incorrect assumptions of a particular platform. Incompatible systems. A new API or communications protocol may seem to work when two systems use different versions, but errors may occur when a function or feature implemented in one version is changed or missing in another. In production systems which must run continually, shutting down the entire system for a major update may not be possible, such as in the telecommunication industry or the internet. In this case, smaller segments of a large system are upgraded individually, to minimize disruption to a large network. However, some sections could be overlooked and not upgraded, and cause compatibility errors which may be difficult to find and repair. Incorrect code annotations. Concurrency Deadlock, where task A cannot continue until task B finishes, but at the same time, task B cannot continue until task A 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. Resourcing 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 are frequently security bugs. 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. Syntax Use of the wrong token, 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. Teamwork 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