Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@rossberg
Copy link
Collaborator

This syncs with the upstream wasm-3.0 branch.

That also added a couple of new tests, and unfortunately, one of them, gc/array_new_data, fails. The error is that the algorithm for the $cunpack function returns an empty result. Having done a little print-debugging, I found that this happens for the argument I32, which should be working just fine according to the function's definition. I suspect that there is a bug with the pattern matching on SubE patterns, possibly in the interpreter or the translation.

Can somebody with familiarity of the interpreter please have a look?

Btw, we are now passing 100% of tests without passing all of them. :)

rossberg and others added 30 commits March 1, 2023 15:30
Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 2 to 4.1.7.
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](actions/download-artifact@v2...v4.1.7)

---
updated-dependencies:
- dependency-name: actions/download-artifact
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 2 to 4.1.7.
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](actions/download-artifact@v2...v4.1.7)

---
updated-dependencies:
- dependency-name: actions/download-artifact
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 2 to 4.1.7.
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](actions/download-artifact@v2...v4.1.7)

---
updated-dependencies:
- dependency-name: actions/download-artifact
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
…-github/workflows/actions/download-artifact-4.1.7

Bump actions/download-artifact from 2 to 4.1.7 in /.github/workflows
…in-index

Fix typing of `array.new` in the index of instructions
Noticed that the existing tests didn't exercise out-of-bounds indexing of the
data segment, so I added a test for that. At the same time, since I was already
creating a dedicated `.wast` file for testing `array.new_data`, I also added a
few general tests to round the file out. Some of these might technically
duplicate things that already happen to be tested in `array.wast`, but I think
that's probably fine, and that it is good to have dedicated tests in this new
file. I can remove them if we'd rather not have these potential-duplicate tests.
…s-array-new-data

Expand tests for `array.new_data`
Similar to WebAssembly/gc#562 but for `array.new_elem`.

I opted to exercise both expression-style elements and the old MVP-style
function-index elements, as they have slightly different representations in
Wasmtime and that means we end up doing the indexing in two different code paths
depending on which type of element segment we have. Figured that other engines
might have similar code paths so it's good to test both.
…-bounds-tests

Test out-of-bounds element segment indexing for `array.new_elem`
The table maximum is now a 64-bit values, so test that we actually
support values outside the 32-bit range.
@rossberg
Copy link
Collaborator Author

@f52985

@f52985
Copy link
Collaborator

f52985 commented Jan 22, 2025

this happens for the argument I32, which should be working just fine according to the function's definition.

This is an unfortunate result of, the type-matching in AL interpreter being totally hard-coded. This fix should work.. for now, but eventually, this hard-codeness should be removed.

@rossberg
Copy link
Collaborator Author

Makes sense, thanks!

@rossberg rossberg merged commit 888a24f into main Jan 22, 2025
13 checks passed
@rossberg rossberg deleted the sync-upstream branch January 22, 2025 13:43
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.