-
Notifications
You must be signed in to change notification settings - Fork 820
Limit the number of passive segments to work around a Chrome bug #2613
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
Conversation
Chrome is currently decoding the segment indices as signed numbers, so some ranges of indices greater than 63 do not work. As a temporary workaround, limit the number of segments produced by MemoryPacking to 63 when bulk-memory is enabled.
src/passes/MemoryPacking.cpp
Outdated
|
|
||
| // FIXME: Chrome has a bug decoding section indices that prevents it from | ||
| // using more than 63. Just use MaxDataSegments once this is fixed. | ||
| uint32_t MAX_SEGMENTS; |
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.
Why all caps?
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.
It's not actually a constant, but it does fill the role of a constant, so I thought it would be appropriate to name it like a constant. I can change this if you'd like.
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.
No worries.
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.
Might want to reference this bug so you know when this can be removed: https://bugs.chromium.org/p/v8/issues/detail?id=10151
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.
+1 to renaming it, +1 to linking to the bug with a comment like "temporary workaround" etc.
src/passes/MemoryPacking.cpp
Outdated
|
|
||
| // FIXME: Chrome has a bug decoding section indices that prevents it from | ||
| // using more than 63. Just use MaxDataSegments once this is fixed. | ||
| uint32_t MAX_SEGMENTS; |
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.
+1 to renaming it, +1 to linking to the bug with a comment like "temporary workaround" etc.
…Assembly#2613) Chrome is currently decoding the segment indices as signed numbers, so some ranges of indices greater than 63 do not work. As a temporary workaround, limit the number of segments produced by MemoryPacking to 63 when bulk-memory is enabled.
Chrome is currently decoding the segment indices as signed numbers, so
some ranges of indices greater than 63 do not work. As a temporary
workaround, limit the number of segments produced by MemoryPacking to
63 when bulk-memory is enabled.