Bug 294896

Summary: [GTK][WPE] MemoryMappedGPUBuffer::mapIfNeeded() does not handle mmap() errors properly
Product: WebKit Reporter: Nikolas Zimmermann <zimmermann>
Component: WPE WebKitAssignee: Nikolas Zimmermann <zimmermann>
Status: RESOLVED FIXED    
Severity: Normal CC: bugs-noreply
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   

Nikolas Zimmermann
Reported 2025-06-24 02:03:43 PDT
If mmap() fails MAP_FAILED is returned, which we store as m_mappedData (e.g. (void*)-1). We later verify if the mapping succeeded, by checking if m_mappedData is non-null, and incorrectly assume we can use memcpy() to alter the mapped region. Instead reset m_mappedData to nullptr, if mmap() returned MAP_FAILED.
Attachments
Nikolas Zimmermann
Comment 1 2025-06-24 02:07:03 PDT
EWS
Comment 2 2025-06-24 08:01:22 PDT
Committed 296562@main (2111c09233db): <https://commits.webkit.org/296562@main> Reviewed commits have been landed. Closing PR #47111 and removing active labels.
Note You need to log in before you can comment on or make changes to this bug.