yvvan added a comment. But I don't know the source of that issue, I only know how to fix it because I caught that one in debugger and added a check to prevent it. How can I write testcase for such fix? https://reviews.llvm.org/D36458