Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
GoogleCodeExporter opened this issue Jul 29, 2015 · 3 comments

Comments

@GoogleCodeExporter
Copy link

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 [email protected] on 9 Jun 2015 at 6:56

@GoogleCodeExporter
Copy link
Author

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

Original comment by [email protected] on 9 Jun 2015 at 6:14

@GoogleCodeExporter
Copy link
Author

This is not a patch submission. This is just to root cause the problem and 
explain it clearly.

Original comment by [email protected] on 19 Jun 2015 at 8:08

@GoogleCodeExporter
Copy link
Author

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

Original comment by [email protected] on 19 Jun 2015 at 8:42

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant