Is there a name for the class of software errors that arise from the fact that the software believes something wrong about the state of the world?

(Allow me a bit of anthropomorphization of software, for the sake of explanation.)

One example:

A temperature sensor correctly reads 19°C, but the software accesses its memory location in the wrong way and ends up reading 24°C.

This mismatch between the real value (19) and the believed value (24) would then kick-off some actions that are reasonable for 24°C, but not for 19°C.

The bug here is not that the wrong actions have been performed, because they are consistent with the state that that software believes to exist. The bug here is in the fact that the software formed a belief that does not match the reality. From there on other reasonable but wrong things happened (a classic case of ex falso quodlibet).

Another example:

A network interface is up, but configured in a way that makes the operating system believe that it actually down.

Programs asking the OS "is the network working?" will get the wrong answer but will trust it and act accordingly (for example showing stale Web pages from the offline cache).

TOCTOU errors would be a subclass of this more generic class of errors (TOCTOU errors are due to timing, the errors in the class I'm talking about can be caused by any issue.)

  • $\begingroup$ "From there on other reasonable but wrong things happened" << Or totally unreasonable things will happen. What if another part of the software reaccesses the sensor, correctly reads 19°C, and doesn't realise the inconsistency? Then you have two variables T1 = 24 and T2 = 19, and the software believes that they are equal, which can lead to all kinds of unreasonable behaviours, starting with an arithmetic expression taking arbitrarily large values. $\endgroup$
    – Stef
    Dec 4, 2023 at 11:02

2 Answers 2


Maybe hypnosis, as used by Raymond Chen to describe a closely related set of bugs?

It’s like saying, “I am a bad guy from a 1960’s spy movie. I have successfully hypnotized the victim into obeying all of my commands, while nevertheless behaving perfectly normally. I tell the victim to go to the bank, withdraw all their money, and bring it to me. This is a security flaw in the bank. It should not allow hypnotized people to withdraw money!”

The bank did its job, which is to confirm the identity of the person withdrawing the money. The person at the counter did nothing to draw suspicion, and all the paperwork checked out, so they got their money.

The system sees that there is a process running as the user, and that process is asking for the password that the user had saved earlier. Now, certainly, users are permitted to access the passwords that they had saved [...] and the Credential Manager is correct in returning those saved passwords to that user.


The system ("the bank") did nothing wrong except trusting its reading of the state. All subsequent actions were compatible with that perceived state. Not real bugs there. The perceived bug is due to the fact that the system did not know that the state was a wrong reading of the reality (in this case because it has been manipulated, but it could happen also due to a mistake).


GIGO - Garbage In, Garbage Out.

  • $\begingroup$ GIGO is an even more general class and applies to the second part of the problem. GIGO does not say anything about the fact that the software miscalculated something during the "creation of the belief". $\endgroup$
    – gioele
    Dec 3, 2023 at 11:33
  • $\begingroup$ Well, you have a sensor creating some electrical signal based on a temperature of 19 degrees, then things happen, and then your software is told there is a temperature of 24 degrees. The point where the software is told “24 degrees” is the “garbage in” point. $\endgroup$
    – gnasher729
    Dec 4, 2023 at 22:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.