Driving the output of a logic gate too far outside the rail voltage
can trigger a latchup. This can happen with as little as one
diode-drop of excessive voltage. The overvoltage/spike has the effect
of activating a "parasitic" structure on the die (a set of P/N
junctions not normally part of the circuit, but created in part as a
side effect of the way the die is fabricated). If you're unlucky, the
parasitic junctions form a PNPN structure, a.k.a. a thyristor or SCR.
The spike "turns on" this thyristor, and it begins acting as a short
circuit which often can't be reset by any means less drastic than
turning off the power entirely.
If the source of the overvoltage has enough charge it and a low enough
impedance, the resulting current flow through the parasitic can
destroy the chip.
I heard a tale some years ago about an incident involving a new,
prototype RISC CPU. The first silicon had just come back from the
fab, in one of the special ceramic packages with a quartz lid (to
allow for inspection of the chip). Chip was carefully powered up, and
lo and behold it worked! One of the developers was so proud that he
whipped out a camera and took a photo of the chip in the development
board.
Bad move. The camera's flash fired. The flash emitted enough UV
(which went through the flash's lens, and through the clear quartz lid
of the chip) to cause photoelectric-effect activation of a bunch of
the exposed gates on the surface of the chip - a bunch of electrons
got knocked loose by the bright light. A whole bunch of parasitic
thyristor structures turned on, and (in effect) short-circuited the
power supply to ground on multiple places on the chip.
The camera's flash was followed, with no perceptible delay, by a
bright flash _inside_ the chip's lid. Boom. Completely dead chip.
Do not pass Go, do not collect $200, no saving throw possible.