Use a llvm::SmallString instead of a char[] to avoid corrupting the stack (thanks Axel)
Revert previous changes and make sure the llvm::SmallString is not empty
Use set_size so make sure the llvm::SmallString is not empty