Merge "Fix ubsan error on unittest"