clang gets stuck when compiling perl with ubsan

I attempted to build perl with clang-3.6 and encountered an issue.
When building the source code with flag -fsanitize=undefined, clang
got stuck in compiling some files.
If remove the flag, clang can compile it in 3 seconds.
For example, clang can’t compile the following file for 30 mins.

clang -fsanitize=undefined -c -fwrapv -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -Wall -Werror=declaration-after-statement -Wextra -Wc+±compat -Wwrite-strings -O2 -DVERSION="0.32" -DXS_VERSION="0.32" -fPIC “-I…/…” -DPERL_EXT_RE_BUILD -DPERL_EXT_RE_DEBUG -DPERL_EXT re_exec.c

I’m pretty sure that’s another instance of, which is not yet fixed :frowning:
I don’t have good suggestions, other than lower optimization level, or reduce the file size, or reduce the set of enabled UBSan checks.