aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormark@chromium.org <mark@chromium.org@4c0a9323-5329-0410-9bdc-e9ce6186880e>2010-07-21 21:21:07 +0000
committermark@chromium.org <mark@chromium.org@4c0a9323-5329-0410-9bdc-e9ce6186880e>2010-07-21 21:21:07 +0000
commit615d2c0d6d5aa91c624df3ae647daca568ba1a9c (patch)
tree3d5dc10ac984fa270517c3ea4851f9ea0c2e96e9
parentClean up build for 64 bit. (diff)
downloadbreakpad-615d2c0d6d5aa91c624df3ae647daca568ba1a9c.tar.xz
Separate the "hello" message from the parameter messages in
Inspector::ReadMessages as was done before r627. The "hello" message contains the parameter count and is referenced while the message reader loops through parameter messages. Prior to r627, both messages were named |message|, which was confusing, probably caused a compiler warning, and apparently provided the motivation to share them. This caused the crash inspector to fail to properly collect the parameters. The common failure mode (although others are possible) was for the inspector to attempt tor read more parameter messages than were available, resulting in an IPC timeout and inspector death. No crash report would be written, and the application expecting its crash to be inspected would time out waiting for a response from the inspector and then _exit. This is effectively a failure to properly handle crashes. The inner message is reintroduced, and named parameter_message for disambiguation. BUG=chromium:49821 TEST=Crashes catchable by the Mac Breakpad framework Review URL: http://breakpad.appspot.com/123002 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@628 4c0a9323-5329-0410-9bdc-e9ce6186880e
-rw-r--r--src/client/mac/crash_generation/Inspector.mm5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/client/mac/crash_generation/Inspector.mm b/src/client/mac/crash_generation/Inspector.mm
index 1fe2a208..a8930858 100644
--- a/src/client/mac/crash_generation/Inspector.mm
+++ b/src/client/mac/crash_generation/Inspector.mm
@@ -331,11 +331,12 @@ kern_return_t Inspector::ReadMessages() {
// we are expected to read.
// Read each key/value pair, one mach message per key/value pair.
for (unsigned int i = 0; i < info.parameter_count; ++i) {
- result = receive_port.WaitForMessage(&message, 1000);
+ MachReceiveMessage parameter_message;
+ result = receive_port.WaitForMessage(&parameter_message, 1000);
if(result == KERN_SUCCESS) {
KeyValueMessageData &key_value_data =
- (KeyValueMessageData&)*message.GetData();
+ (KeyValueMessageData&)*parameter_message.GetData();
// If we get a blank key, make sure we don't increment the
// parameter count; in some cases (notably on-demand generation
// many times in a short period of time) caused the Mach IPC