[webkit-changes] [WebKit/WebKit] e95bae: [WebGPU] DeviceImpl::createBindGroup may access re...

mwyrzykowski noreply at github.com
Sun May 28 16:14:41 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: e95baed3c64d07d96f191316e7702504af29f100
      https://github.com/WebKit/WebKit/commit/e95baed3c64d07d96f191316e7702504af29f100
  Author: Mike Wyrzykowski <mwyrzykowski at apple.com>
  Date:   2023-05-28 (Sun, 28 May 2023)

  Changed paths:
    M Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUDeviceImpl.cpp

  Log Message:
  -----------
  [WebGPU] DeviceImpl::createBindGroup may access re-allocated memory
https://bugs.webkit.org/show_bug.cgi?id=257192
<radar://109704196>

Reviewed by Myles C. Maxfield.

It is unsafe to store pointers to elements in a vector when the size is changing.

Address this by using SegmentedVector with a segment size of 1 as we expect the
container to generally have 0 values, 1 when the feature is used, and rarely greater
than 1.

* Source/WebCore/PAL/pal/graphics/WebGPU/Impl/WebGPUDeviceImpl.cpp:
(PAL::WebGPU::DeviceImpl::createBindGroup):

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




More information about the webkit-changes mailing list