In SBLaunchInfo::GetShell() just make a local ConstString from the shell and return GetCString(). Once a string has been const-ified, it will remain in the string pool forever. This will keep this function thread safe. http://reviews.llvm.org/D5805