1. UB - Noun
2. UB - Proper noun
UB
(historical) Initialism of Urząd Bezpieczeństwa, a branch of the secret police in communist Poland.
UB (countable and uncountable, plural UBs)
(programming, C, C++) Initialism of undefined behavior, behavior not defined in the language standard.