Why x86's undefined instruction is called ud2, not ud
Why is the x86 undefined instruction called ud2? Why 2?
The x86 ud2 instruction reliably triggers an invalid opcode exception, but why the '2'? Raymond Chen traces its origin to two competing byte sequences: 0F FF and 0F B9. Intel later made the behavior official, retroactively naming them ud0 and ud1, while ud2 became the recommended choice because it is a clean two-byte instruction with no parameters, avoiding decode quirks that could cause access violations instead of invalid opcode exceptions.
With a sufficient number of users, all observable behaviors will be depended upon by somebody.