What is undefined behavior (UB)? According to the ISO C++ Standard (§1.3.24, N4296), it is "behavior for which this International Standard imposes no requirements."
This means that when a program encounters UB, it is allowed to do whatever it wants. This often means a crash, but it may si...