Skip to content

Conversation

@tlively
Copy link
Member

@tlively tlively commented Jan 22, 2020

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.

// 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;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why all caps?

Copy link
Member Author

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.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No worries.

Copy link
Member

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

Copy link
Member

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.


// 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;
Copy link
Member

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.

@tlively tlively merged commit cfc581f into WebAssembly:master Jan 23, 2020
awtcode pushed a commit to awtcode/binaryen that referenced this pull request Jan 23, 2020
…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.
@tlively tlively deleted the passive-segment-limit branch April 24, 2020 23:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants