Bug 241660 - Make IPC::Attachment moveable on DARWIN
Summary: Make IPC::Attachment moveable on DARWIN
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Platform (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Matt Woodrow
URL:
Keywords: InRadar
Depends on:
Blocks: 238944
  Show dependency treegraph
 
Reported: 2022-06-15 17:41 PDT by Matt Woodrow
Modified: 2022-06-19 21:26 PDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Matt Woodrow 2022-06-15 17:41:37 PDT
This is the DARWIN-port specific piece of 238944.

Currently Attachment just holds a mach_port_t, and doesn't attempt to do any memory management or ownership transfer of the port.

This makes it very easy to leak. If we try to send an IPC message (and add the Attachment to m_attachments on Encoder), but fail to send the message, then we just leak the port.
Comment 1 Radar WebKit Bug Importer 2022-06-15 17:41:57 PDT
<rdar://problem/95253070>
Comment 2 Matt Woodrow 2022-06-15 18:27:47 PDT
Pull request: https://github.com/WebKit/WebKit/pull/1563
Comment 3 EWS 2022-06-19 21:26:28 PDT
Committed r295666 (251671@main): <https://commits.webkit.org/251671@main>

Reviewed commits have been landed. Closing PR #1563 and removing active labels.