rdar://problem/10998562

lldb crashes under guard malloc

Fix CommandObjectSettingsAppend::ExecuteRawCommandString() so that it does not perform the cmd_args.Shift()
operation after it has got the var_name out of the raw string, since StringRef is manipulating the raw
string later on.

llvm-svn: 152194
This commit is contained in:
Johnny Chen 2012-03-07 02:09:02 +00:00
parent 8c029611a6
commit 2c76eb02a9

View File

@ -1143,7 +1143,8 @@ CommandObjectSettingsAppend::ExecuteRawCommandString (const char *raw_command, C
}
var_name_string = var_name;
cmd_args.Shift();
// Do not perform cmd_args.Shift() since StringRef is manipulating the
// raw character string later on.
// Split the raw command into var_name and value pair.
llvm::StringRef raw_str(raw_command);