Encyclopedia

heisenbug

Also found in: Dictionary, Medical, Financial, Wikipedia.

heisenbug

(jargon)
/hi:'zen-buhg/ (From Heisenberg's Uncertainty Principle in quantum physics) A bug that disappears or alters its behaviour when one attempts to probe or isolate it. (This usage is not even particularly fanciful; the use of a debugger sometimes alters a program's operating environment significantly enough that buggy code, such as that which relies on the values of uninitialised memory, behaves quite differently.)

In C, nine out of ten heisenbugs result from uninitialised auto variables, fandango on core phenomena (especially lossage related to corruption of the malloc arena) or errors that smash the stack.

Opposite: Bohr bug. See also mandelbug, schroedinbug.
This article is provided by FOLDOC - Free Online Dictionary of Computing (foldoc.org)

Heisenbug

A bug in software that cannot be duplicated while under observation in a debugger. German theoretical physicist Werner Heisenberg showed that observing quantum mechanical behavior actually alters it. A software debugger may sometimes change the operating environment just enough to perform the process without error. For example, data that might have been stored in hardware registers when the program was optimized may be stored in main memory when compiled for debugging, and the memory values may be less accurate.

Timing can also be a cause of Heisenbugs; for example, a multithreaded process may crash under normal operation but work perfectly when instructions are executed one at a time. See bug and debugger.
Copyright © 1981-2025 by The Computer Language Company Inc. All Rights reserved. THIS DEFINITION IS FOR PERSONAL USE ONLY. All other reproduction is strictly prohibited without permission from the publisher.
Mentioned in
References in periodicals archive
However, this is not feasible for at least three reasons: (1) the resulting traces quickly become unreasonably large, (2) the overhead of collecting every memory access normally slows down the program with two orders of magnitude, causing a serious probe effect and in some cases Heisenbugs (Heisenbugs are bugs whose symptoms disappear due to the intrusion caused by observing them), and (3) it is difficult to distinguish the feasible from the apparent data races (at the implementation level, they are all similar).
1991; Netzer 1993] and may be small enough to circumvent Heisenbugs and to limit the probe effect.
Most programmers have encountered so-called Heisenbugs, named after the Heisenberg uncertainty principle in physics.
Copyright © 2003-2025 Farlex, Inc Disclaimer
All content on this website, including dictionary, thesaurus, literature, geography, and other reference data is for informational purposes only. This information should not be considered complete, up to date, and is not intended to be used in place of a visit, consultation, or advice of a legal, medical, or any other professional.