Bug 234169

Summary: Darwin const ShareableBitmap::Handle gets invalidated during IPC encoding
Product: WebKit Reporter: Kimmo Kinnunen <kkinnunen>
Component: WebKit Process ModelAssignee: Matt Woodrow <mattwoodrow>
Status: RESOLVED FIXED    
Severity: Normal CC: kkinnunen, simon.fraser, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=231009
Bug Depends on: 238937    
Bug Blocks:    

Description Kimmo Kinnunen 2021-12-10 12:38:38 PST
const ShareableBitmap::Handle gets invalidated during IPC encoding

.. via SharedMemory::Handle IPC encoding transferring the send right to the receiver.

ShareableBitmap::Handle&&, SharedMemory::Handle&& should be transferred this way

const ShareableBitmap::Handle, const SharedMemory::Handle should be transferred by copying

Otherwise causes bugs when handle is held and sent multiple times, as in bug  231009
Comment 1 Radar WebKit Bug Importer 2021-12-17 12:39:17 PST
<rdar://problem/86646632>
Comment 2 Matt Woodrow 2023-06-04 15:05:40 PDT
Pull request: https://github.com/WebKit/WebKit/pull/14659
Comment 3 EWS 2023-06-06 22:03:12 PDT
Committed 264922@main (6c8a9cf2cbd2): <https://commits.webkit.org/264922@main>

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