fagensden / google-breakpad

Automatically exported from code.google.com/p/google-breakpad
0 stars 0 forks source link

microdump processor unable to process microdump due to whitespaces in input #654

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
The microdump processor parsing has a bug where it does not trim trailing 
spaces in the cpu context and exits with the following error.
"Malformed CPU context. Got 369 bytes instead of 368.

After applying the below patch in microdump.cc, it is able to process the dump.
@@ -256,7 +258,12 @@
       stack_content.insert(stack_content.end(), chunk.begin(), chunk.end());

     } else if ((pos = line.find(kCpuKey)) != string::npos) {
-      string cpu_state_str(line, pos + strlen(kCpuKey));
+      string cpu_state_str_raw(line, pos + strlen(kCpuKey));
+std::istringstream cpu_state_tokens(cpu_state_str_raw);
+string cpu_state_str;
+cpu_state_tokens >> cpu_state_str;

Can somebody take this patch to the main code.

Original issue reported on code.google.com by atishayj...@gmail.com on 9 Jun 2015 at 6:56

GoogleCodeExporter commented 9 years ago
We don't take patches here. If you would like to contribute a patch, upload it 
to codereview.chromium.org

Original comment by thestig@chromium.org on 9 Jun 2015 at 6:14

GoogleCodeExporter commented 9 years ago
This is not a patch submission. This is just to root cause the problem and 
explain it clearly.

Original comment by atishayj...@gmail.com on 19 Jun 2015 at 8:08

GoogleCodeExporter commented 9 years ago
There is no need for a patch, this is being addressed in 
https://codereview.chromium.org/1181113004/

Original comment by primi...@chromium.org on 19 Jun 2015 at 8:42