mirror of
https://github.com/chromium/crashpad.git
synced 2024-12-31 01:43:03 +08:00
79b4434c81
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 Review URL: https://codereview.chromium.org/756803002