Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(114)

Issue 753363003: MachMessageServer: invert the request buffer allocation logic (Closed)

Created:
6 years ago by Mark Mentovai
Modified:
6 years ago
Reviewers:
Robert Sesek
CC:
crashpad-dev_chromium.org
Base URL:
https://chromium.googlesource.com/crashpad/crashpad@master
Project:
crashpad
Visibility:
Public.

Description

MachMessageServer: invert the request buffer allocation logic. The existing implementation used the same logic as is found in mach_msg_server(), but that logic seems incorrect. When the caller wants to retry a mach_msg() receive of a too-large message that returns MACH_RCV_TOO_LARGE, there’s no harm in attempting the receive with a larger buffer initially. On the other hand, if the caller does not want to retry such mach_msg() receive attempts, it’s an indication that the caller is expecting to be intolerant of too-large messages, and there’s no need to attempt the receive with a buffer any larger than requested. TEST=util_test R=rsesek@chromium.org Committed: https://chromium.googlesource.com/crashpad/crashpad/+/a68594234262beee7c0cc2ad9f73b3c08264f30f

Patch Set 1 #

Patch Set 2 : " #

Patch Set 3 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+10 lines, -2 lines) Patch
M util/mach/mach_message_server.cc View 1 2 1 chunk +10 lines, -2 lines 0 comments Download

Messages

Total messages: 4 (1 generated)
Mark Mentovai
6 years ago (2014-11-25 05:26:08 UTC) #2
Robert Sesek
LGTM
6 years ago (2014-11-25 19:34:05 UTC) #3
Mark Mentovai
6 years ago (2014-11-25 20:04:34 UTC) #4
Message was sent while issue was closed.
Committed patchset #3 (id:40001) manually as
a68594234262beee7c0cc2ad9f73b3c08264f30f (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698