| Previous | Next |
| KERN_SUCCESS | kOSReturnError |
MACH_MSG_SUCCESS
MACH_MSG_SUCCESS is the zero result of mach_msg or a related Mach messaging operation. The send, receive, or combined transaction completed at the IPC layer; the receiver still has to validate the message identifier, size, descriptors, trailer, and application-level reply fields.
Where the result is produced
MACH_MSG_SUCCESS confirms IPC transport completion, not application-level acceptance of the message body. A server can receive a message successfully and then return a protocol-specific error in its reply.
Evidence to preserve
| Capture | Diagnostic value |
|---|---|
| Mach_msg options, send and receive sizes, timeout values, notify port, and the exact mach_msg_return_t. | Identifies the concrete object and operation associated with the result. |
| Message header bits, message ID, declared size, descriptor count, and complex-message flag. | Separates an argument or lifecycle state from a failure reported by the underlying provider. |
| The disposition of every transferred port right and ownership of out-of-line memory. | Shows which port rights and out-of-line regions changed ownership in this message. |
| Receive buffer capacity, trailer format, reply-port identity, and the protocol version expected by the receiver. | Shows whether the observed value is the primary result or a translated summary. |
A controlled diagnostic sequence
- Send a known protocol message and verify the receiver accepts its ID and descriptor schema after
MACH_MSG_SUCCESS. - Exercise a bounded timeout or deliberately undersized receive buffer to confirm those results are not decoded as success.
- Track transferred rights and out-of-line regions through destruction of the received message.
Correction and proof
Targeted correction. Validate the received schema and ownership rules after transport success, and keep application reply errors separate from mach_msg_return_t handling.
Acceptance criterion. The send or receive returns it, message framing passes protocol validation, transferred resources have one clear owner, and the expected application reply is processed separately.
Technical references
- Apple XNU: Mach message definitions — defines the status namespace used.
- Apple: Mach overview — documents the API or lifecycle boundary behind it.
- Apple XNU: kern_return_t definitions — provides ABI, implementation, or protocol context.
- Apple XNU source repository — supports the portability and verification limits.
Looking for a different code? Search another status or error code.
