-
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
[WGSL] Type::size can still overflow #29068
Merged
webkit-commit-queue
merged 1 commit into
WebKit:main
from
tadeuzagallo:eng/WGSL-Typesize-can-still-overflow
May 27, 2024
Merged
[WGSL] Type::size can still overflow #29068
webkit-commit-queue
merged 1 commit into
WebKit:main
from
tadeuzagallo:eng/WGSL-Typesize-can-still-overflow
May 27, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Member
EWS run on current version of this PR (hash f0c56f7) |
auto stride = WTF::roundUpToMultipleOf(array.element->alignment(), elementSize); | ||
if (stride < elementSize) | ||
return std::numeric_limits<unsigned>::max(); | ||
size *= stride; |
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.
does this run the risk of overflow?
mwyrzykowski
approved these changes
May 24, 2024
webkit-ews-buildbot
added
the
merging-blocked
Applied to prevent a change from being merged
label
May 24, 2024
tadeuzagallo
added
merge-queue
Applied to send a pull request to merge-queue
and removed
merging-blocked
Applied to prevent a change from being merged
labels
May 27, 2024
https://bugs.webkit.org/show_bug.cgi?id=274669 rdar://128677742 Reviewed by Mike Wyrzykowski. In 279204@main I added checks for overflow in Type::size, but I missed the case where `array.element->size()` returns uint_max, and rounding it up to the alignment returns 0. * LayoutTests/fast/webgpu/fuzz-128677742-expected.txt: Added. * LayoutTests/fast/webgpu/fuzz-128677742.html: Added. * Source/WebGPU/WGSL/Types.cpp: (WGSL::Type::size const): Canonical link: https://commits.webkit.org/279343@main
webkit-commit-queue
force-pushed
the
eng/WGSL-Typesize-can-still-overflow
branch
from
May 27, 2024 10:16
f0c56f7
to
2d30b56
Compare
Committed 279343@main (2d30b56): https://commits.webkit.org/279343@main Reviewed commits have been landed. Closing PR #29068 and removing active labels. |
webkit-commit-queue
removed
the
merge-queue
Applied to send a pull request to merge-queue
label
May 27, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
2d30b56
f0c56f7