[webkit-changes] [WebKit/WebKit] 53d6c3: [WebGPU] Crash in Buffer::getMappedRange if size is 0

mwyrzykowski noreply at github.com
Mon Dec 4 23:31:52 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 53d6c3698548446f66f32ace8fdf610bd324ec78
      https://github.com/WebKit/WebKit/commit/53d6c3698548446f66f32ace8fdf610bd324ec78
  Author: Mike Wyrzykowski <mwyrzykowski at apple.com>
  Date:   2023-12-04 (Mon, 04 Dec 2023)

  Changed paths:
    M Source/WebGPU/WebGPU/Buffer.mm

  Log Message:
  -----------
  [WebGPU] Crash in Buffer::getMappedRange if size is 0
https://bugs.webkit.org/show_bug.cgi?id=265850
<radar://119168913>

Reviewed by Dan Glastonbury.

Buffer::getMappedRange should return a valid pointer
even if validation fails, so ensure that size is >= 1
otherwise the pointer will not be valid.

* Source/WebGPU/WebGPU/Buffer.mm:
(WebGPU::Device::createBuffer):
Remove redundant validation call.
(WebGPU::Buffer::getMappedRange):

Canonical link: https://commits.webkit.org/271539@main




More information about the webkit-changes mailing list