Skip to content
This repository was archived by the owner on Sep 8, 2025. It is now read-only.

fix issues running component-async-tests under miri#217

Merged
dicej merged 5 commits into
mainfrom
dicej/more-miri-test-improvements
Jun 17, 2025
Merged

fix issues running component-async-tests under miri#217
dicej merged 5 commits into
mainfrom
dicej/more-miri-test-improvements

Conversation

@dicej

@dicej dicej commented Jun 17, 2025

Copy link
Copy Markdown
Collaborator

In my previous commit, I had missed making a few test suites miri-compatible. In
addition, some of the suites (e.g. round_trip) run each test multiple times
using different host APIs, which is intolerably slow on miri, so we now only use
one call style per test when miri is enabled. Relatedly, we now build the test
programs using --release when the MIRI_TEST_CWASM_DIR environment variable
is set.

Finally, miri's willingness to allocate [u8] arrays which are not 4-byte
aligned exposed an issue in error_context_new, which I've fixed.

Note that this cherry-picks a few of Alex's provenance-related fixes which have been PR'd upstream.

alexcrichton and others added 5 commits June 17, 2025 09:46
Joel and I went down a deep rabbit hole today trying to figure out
what's going on with a new code pattern which was being flagged as
violating stacked borrows. At the end of the day I'm honestly not 100%
sure what this doing or how to explain all the behavior we were seeing,
but this seems to be basically equivalent and we're otherwise able to
get a bit further so I figured I'd commit this.

Along the way I updated the preexisting `table-intrinsics` test to
correctly use the table it was supposed to be using instead of using the
previous table by accident.
Signed-off-by: Joel Dice <joel.dice@fermyon.com>
Signed-off-by: Joel Dice <joel.dice@fermyon.com>
In my previous commit, I had missed making a few test suites miri-compatible. In
addition, some of the suites (e.g. `round_trip`) run each test multiple times
using different host APIs, which is intolerably slow on miri, so we now only use
one call style per test when miri is enabled.  Relatedly, we now build the test
programs using `--release` when the `MIRI_TEST_CWASM_DIR` environment variable
is set.

Finally, miri's willingness to allocate `[u8]` arrays which are _not_ 4-byte
aligned exposed an issue in `error_context_new`, which I've fixed.

Signed-off-by: Joel Dice <joel.dice@fermyon.com>
Signed-off-by: Joel Dice <joel.dice@fermyon.com>
@dicej dicej added this pull request to the merge queue Jun 17, 2025
Merged via the queue into main with commit f240483 Jun 17, 2025
44 checks passed
@dicej dicej deleted the dicej/more-miri-test-improvements branch June 17, 2025 16:38
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants