Undefined behaviour
|
In computer science, to simplify the specification and allow some flexibility in implementation, the specification sometimes defines a behavior undefined. For example, the specification of a programming language might say that the length of an identifier must be less than 64, and that if the identifier is longer than that, the resulting behavior is undefined. In this way, the creator of the compiler for this language does not have to worry about what would happen if the identifier is longer than the specified length.
In general, any behaviour whatsoever is valid after an undefined situation has been encountered. In an extreme sense, it would be permitted by the specification for the compiler to launch a game of Space Invaders when it handles undefined behaviour.
External link
- Nasal demons - jargon term for consequences of undefined behaviour (http://wombat.doc.ic.ac.uk/foldoc/foldoc.cgi?nasal+demons)