Skip to content

Update bits used for malformed memory/table/global flags #1936

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

Merged
merged 1 commit into from
Jun 24, 2025

Conversation

alexcrichton
Copy link
Contributor

This commit updates a few locations where tests assert that various bits are invalid to set for memories, tables, and globals:

  • For memories bit 0b10 of the "flags" byte was tested to ensure that it's invalid, but this bit is used in the WebAssembly threads proposal to indicate a shared memory. Additionally bit 0b100 is used by the memory64 proposal and the 0b1000 bit is used by the custom-page-sizes proposal. This changes the test to assert that bit 0b10000 is invalid as it's not in use by any proposal.

  • For tables bit 0b10 of the "flags" byte was tested to ensure that it's invalid, but this bit is used in the WebAssembly shared-everything-threads proposal to indicate a shared table. Additionally bit 0b100 is used by the memory64 proposal. This changes the test to assert that bit 0b1000 is invalid as it's not in use by any proposal.

  • For globals bit 0b10 of the "flags" byte was tested to ensure that it's invalid, but this bit is used in the WebAssembly shared-everything-threads proposal to indicate a shared global. This changes the test to assert that bit 0b100 is invalid as it's not in use by any proposal.

This commit updates a few locations where tests assert that various bits
are invalid to set for memories, tables, and globals:

* For memories bit 0b10 of the "flags" byte was tested to ensure that it's
  invalid, but this bit is used in the WebAssembly threads proposal to
  indicate a shared memory. Additionally bit 0b100 is used by the
  memory64 proposal and the 0b1000 bit is used by the custom-page-sizes
  proposal. This changes the test to assert that bit 0b10000 is invalid
  as it's not in use by any proposal.

* For tables bit 0b10 of the "flags" byte was tested to ensure that it's
  invalid, but this bit is used in the WebAssembly
  shared-everything-threads proposal to indicate a shared table.
  Additionally bit 0b100 is used by the memory64 proposal. This changes
  the test to assert that bit 0b1000 is invalid as it's not in use by
  any proposal.

* For globals bit 0b10 of the "flags" byte was tested to ensure that it's
  invalid, but this bit is used in the WebAssembly
  shared-everything-threads proposal to indicate a shared global.
  This changes the test to assert that bit 0b100 is invalid as it's not in use
  by any proposal.
@rossberg rossberg merged commit 6faed61 into WebAssembly:main Jun 24, 2025
1 check passed
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.

2 participants