Add GCC+UBSan workaround