My experiments with testing

Unusual software bugs

Unusual software bugs are a class of software bugs that are considered exceptionally difficult to understand and repair. There are several kinds, mostly named after scientists who discovered counterintuitive things.


 

Heisenbug

---------------------------------------------------------

A heisenbug (named after the Heisenberg Uncertainty Principle) is a computer bug that disappears or alters its characteristics when an attempt is made to study it.

One common example is a bug that occurs in the released version compile of a program, but not in a debug-mode version; another example is a bug caused by a race condition.

The name "heisenbug" is a pun on the "Heisenberg uncertainty principle," a quantum physics concept which is commonly (yet inaccurately) used to refer to the fact that in the Copenhagen Interpretation model of quantum mechanical behavior, observers affect what they are observing, by the mere act of observing it alone (this is actually the observer effect, and is commonly confused with the Heisenberg uncertainty principle). Note that the claim that observation influences reality is unique to the Copenhagen Interpretation of quantum mechanics, and that other interpretations such as the Many-Worlds Interpretation do not give any special role to observation.

One common reason for heisenbug-like behaviour is that executing a program in debug mode often cleans memory before the program starts, and forces variables onto stack locations, instead of keeping them in registers. These differences in execution can alter the effect of bugs involving out-of-bounds member access or incorrect assumptions about the initial contents of memory. Another reason is that debuggers commonly provide watches or other user interfaces that cause additional code (such as property accessors) to be executed, which can, in turn, change the state of the program. Yet another reason is a fandango on core, the effect of a pointer running out of bounds. In C++, many heisenbugs are caused by uninitialized variables.

 

Source: wikipedia

11:00 - November 2, 2008 - comments {0}


Description

Home
User Profile
Archives
Friends
Recent Entries
- Unusual software bugs