Skip to content

Conversation

@stevenfontanella
Copy link
Member

@stevenfontanella stevenfontanella commented Jan 29, 2026

Followup to #243. Prior to #243, a non-natural alignment for an atomic instruction was not a parse, validation or runtime failure in the spec interpreter / tests, although the spec specified that it would be a parse error (and would be a validation error after #243). Change the reference interpreter and spec test to make a non-natural alignment into a validation error. 8-bit instructions aren't tested for the validation failure since there's no way to have a non-natural alignment for those cases (only a greater one which results in a different validation failure).

Also removed some extra spaces in cmpxchg tests.

Tested with make test locally.

@stevenfontanella stevenfontanella changed the title Add tests when the alignment hint less than the natural alignment Make non-natural alignment a validation error in spec interpreter / test Feb 3, 2026
@stevenfontanella stevenfontanella marked this pull request as ready for review February 3, 2026 00:43
Copy link
Member

@tlively tlively left a comment

Choose a reason for hiding this comment

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

LGTM. Let's see what @conrad-watt and @rossberg think.

Copy link
Member

@rossberg rossberg left a comment

Choose a reason for hiding this comment

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

Looks good, I only have stylistic nits regarding the validator change.

@rossberg
Copy link
Member

rossberg commented Feb 6, 2026

CI keeps failing due to setup problems. The workflows in this repo are outdated, maybe that contributes to it. Can you please try to update ci-interpreter.yml to use ocaml/setup-ocaml@v3 in this PR? Just a shot in the dark, but perhaps that helps.

@stevenfontanella
Copy link
Member Author

stevenfontanella commented Feb 6, 2026

CI keeps failing due to setup problems. The workflows in this repo are outdated, maybe that contributes to it. Can you please try to update ci-interpreter.yml to use ocaml/setup-ocaml@v3 in this PR? Just a shot in the dark, but perhaps that helps.

Looks like that worked and the new CI failure is a spec test that fails from main as well: https://gist.github.com/stevenfontanella/7c4d42d6d2a21a1f3350ea55026854d7. Maybe we need to pull in something from the upstream spec repo?

@stevenfontanella
Copy link
Member Author

stevenfontanella commented Feb 6, 2026

Looks like this commit removed the failing tests in the upstream.

Besides that it looks like quite a few tests fail from main e.g. data.wast, elem.wast, global.wast, imports.wast (all in test/core). Since make test passes with this PR, is it ok to merge anyway, or is there any other check we should do?

@rossberg
Copy link
Member

rossberg commented Feb 9, 2026

Hm, I'm a bit confused now, in the latest CI I only see a test failure for SB.wast, which isn't from upstream?

@stevenfontanella
Copy link
Member Author

I see. It indeed fails with python3 ../test/core/run.py --js node ../test/core/threads/SB.wast (error message) but passes with python3 ../test/core/run.py ../test/core/threads/SB.wast (removing the --js arg).

I'm not too sure about the error itself but I see that this commit in the upstream disabled JS tests in CI and ran the equivalent of my succeeding test. Maybe we should port that to our CI as well? I don't know what the motivation of the upstream commit was.

@stevenfontanella
Copy link
Member Author

Opened #244 to see if the CI can be fixed easily but I don't have permission to run it. Can you check if that helps?

@stevenfontanella
Copy link
Member Author

Opened #244 to see if the CI can be fixed easily but I don't have permission to run it. Can you check if that helps?

#244 seems to work. Rebased onto that branch for now.

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.

3 participants