diff options
author | Johnny Chen <johnny.chen@apple.com> | 2012-03-07 02:09:02 +0000 |
---|---|---|
committer | Johnny Chen <johnny.chen@apple.com> | 2012-03-07 02:09:02 +0000 |
commit | 2c76eb02a9ff404f77e58248b153523fcb33397a (patch) | |
tree | 2c667a0e2b41f9176d65eb53c973129dbf1b2545 /lldb/source/Commands/CommandObjectSettings.cpp | |
parent | 8c029611a6714624878cfd72ecbba8ab968773ea (diff) | |
download | bcm5719-llvm-2c76eb02a9ff404f77e58248b153523fcb33397a.tar.gz bcm5719-llvm-2c76eb02a9ff404f77e58248b153523fcb33397a.zip |
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
Diffstat (limited to 'lldb/source/Commands/CommandObjectSettings.cpp')
-rw-r--r-- | lldb/source/Commands/CommandObjectSettings.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lldb/source/Commands/CommandObjectSettings.cpp b/lldb/source/Commands/CommandObjectSettings.cpp index 74fdd503775..544b43b65d6 100644 --- a/lldb/source/Commands/CommandObjectSettings.cpp +++ b/lldb/source/Commands/CommandObjectSettings.cpp @@ -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); |