https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123873
--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> --- UBSAN is a development tool, not something meant for production uses. And obviously it affects lots of optimizations, the added instrumentations prevent various optimizations and we need to disable other optimizations (most importantly assumption that no objects appear at address 0), otherwise the instrumentation is optimized away.
