-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WebGPU] RemoteBuffer::copy can result in an out of bounds write #29086
[WebGPU] RemoteBuffer::copy can result in an out of bounds write #29086
Conversation
EWS run on previous version of this PR (hash f69b08c) |
f69b08c
to
8a69264
Compare
EWS run on previous version of this PR (hash 8a69264) |
@@ -89,7 +89,7 @@ auto BufferImpl::getBufferContents() -> MappedRange | |||
return { nullptr, 0 }; | |||
|
|||
auto* pointer = wgpuBufferGetBufferContents(m_backing.get()); | |||
auto bufferSize = wgpuBufferGetSize(m_backing.get()); | |||
auto bufferSize = wgpuBufferGetActualSize(m_backing.get()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be clearer if these were called wgpuBufferGetInitialSize
and wgpuBufferGetCurrentSize
?
8a69264
to
48d31a6
Compare
EWS run on current version of this PR (hash 48d31a6) |
48d31a6
to
ef994b7
Compare
https://bugs.webkit.org/show_bug.cgi?id=274678 <radar://128591350> Reviewed by Tadeu Zagallo. RemoteBuffer::copy should use the actual buffer size, not the initial size. * Source/WebCore/Modules/WebGPU/Implementation/WebGPUBufferImpl.cpp: (WebCore::WebGPU::BufferImpl::getBufferContents): * Source/WebGPU/WebGPU/Buffer.mm: (wgpuBufferGetActualSize): * Source/WebGPU/WebGPU/WebGPU.h: * LayoutTests/fast/webgpu/regression/repro_274678-expected.txt: Added. * LayoutTests/fast/webgpu/regression/repro_274678.html: Added. Add regression test for running locally. Canonical link: https://commits.webkit.org/279368@main
ef994b7
to
0fa174e
Compare
Committed 279368@main (0fa174e): https://commits.webkit.org/279368@main Reviewed commits have been landed. Closing PR #29086 and removing active labels. |
0fa174e
48d31a6
🧪 ios-wk2🧪 ios-wk2-wpt🧪 api-ios🧪 gtk-wk2🧪 api-gtk