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

Issue 756803002: Add a ReceiveLarge parameter to MachMessageServer::Run() (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

Add a ReceiveLarge parameter to MachMessageServer::Run(). Previously, MachMessageServer::Run() only provided two strategies for dealing with large messages, indicated by mach_msg() returning MACH_RCV_TOO_LARGE: the receive buffer could be reallocated and the message received, or the entire function could return MACH_RCV_TOO_LARGE to the caller. There are situations where an intermediate behavior might be desirable. This intermediate behavior would allow the function to continue waiting for another message without returning an error to the caller or attempting to receive the large message. This is desirable when dealing with fixed-sized messages and a receiver that might be sent messages by unknown, possibly-malicious callers. This can happen when the corresponding send right is published with the bootstrap server, for example. Existing users continue to request their existing behavior, typically receiving an error when encountering a large message. catch_exception_tool will use the new “ignore” behavior when running in persistent mode. TEST=util_test MachMessageServer.* R=rsesek@chromium.org Committed: https://chromium.googlesource.com/crashpad/crashpad/+/79b4434c81370b66819f8a2e2b47f947bfdac2cc

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+119 lines, -34 lines) Patch
M client/simulate_crash_mac_test.cc View 2 chunks +2 lines, -0 lines 0 comments Download
M snapshot/mac/mach_o_image_annotations_reader_test.cc View 1 chunk +1 line, -0 lines 0 comments Download
M tools/catch_exception_tool.cc View 2 chunks +8 lines, -0 lines 0 comments Download
M util/mach/exc_client_variants_test.cc View 1 chunk +8 lines, -6 lines 0 comments Download
M util/mach/exc_server_variants_test.cc View 1 chunk +8 lines, -6 lines 0 comments Download
M util/mach/exception_ports_test.cc View 1 chunk +8 lines, -6 lines 0 comments Download
M util/mach/mach_message_server.h View 3 chunks +31 lines, -1 line 0 comments Download
M util/mach/mach_message_server.cc View 5 chunks +20 lines, -3 lines 0 comments Download
M util/mach/mach_message_server_test.cc View 6 chunks +33 lines, -12 lines 0 comments Download

Messages

Total messages: 4 (1 generated)
Mark Mentovai
I’ve been concerned about this quirk of MachMessageServer for a little while. In https://codereview.chromium.org/756603003/, ChildPortHandshake::RunServer() ...
6 years ago (2014-11-24 23:01:27 UTC) #2
Robert Sesek
LGTM
6 years ago (2014-11-25 19:29:34 UTC) #3
Mark Mentovai
6 years ago (2014-11-25 19:48:48 UTC) #4
Message was sent while issue was closed.
Committed patchset #1 (id:1) manually as
79b4434c81370b66819f8a2e2b47f947bfdac2cc (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698