Skip to content

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

Merged
rossberg merged 1 commit into
WebAssembly:mainfrom
alexcrichton:change-bits
Jun 24, 2025
Merged

Update bits used for malformed memory/table/global flags#1936
rossberg merged 1 commit into
WebAssembly:mainfrom
alexcrichton:change-bits

Conversation

@alexcrichton
Copy link
Copy Markdown
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