In
computer programming,
undefined behavior (
UB) is the result of executing computer code that does not have a prescribed behavior by the
language specification the code adheres to, for the current state of the program (e.g. memory). This happens when the
translator of the source code makes certain assumptions, but these assumptions are not satisfied during execution.