[Lldb-commits] [lldb] r152194 - /lldb/trunk/source/Commands/CommandObjectSettings.cpp
Johnny Chen
johnny.chen at apple.com
Tue Mar 6 18:09:03 PST 2012
Author: johnny
Date: Tue Mar 6 20:09:02 2012
New Revision: 152194
URL: http://llvm.org/viewvc/llvm-project?rev=152194&view=rev
Log:
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.
Modified:
lldb/trunk/source/Commands/CommandObjectSettings.cpp
Modified: lldb/trunk/source/Commands/CommandObjectSettings.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectSettings.cpp?rev=152194&r1=152193&r2=152194&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectSettings.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectSettings.cpp Tue Mar 6 20:09:02 2012
@@ -1143,7 +1143,8 @@
}
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);
More information about the lldb-commits
mailing list