abrown edited PR #4672 from fix-4671
to main
:
In #4671, the meta-differential fuzz target was finding errors when
running certain Wasm modules (specificallyshr_s
in that case).
@conrad-watt diagnosed the issue as a missing reversal in the operands
passed to the spec interpreter. This change fixes #4671 and adds an
additional unit test to keep it fixed.<!--
Please ensure that the following steps are all taken care of before submitting
the PR.
[ ] This has been discussed in issue #..., or if not, please tell us why
here.[ ] A short description of what this does, why it is needed; if the
description becomes long, the matter should probably be discussed in an issue
first.[ ] This PR contains test cases, if meaningful.
- [ ] A reviewer from the core maintainer team has been assigned for this PR.
If you don't know who could review this, please indicate so. The list of
suggested reviewers on the right can help you.Please ensure all communication adheres to the code of conduct.
-->
conrad-watt created PR review comment:
Internally, the interpreter represents the value stack as a list in reverse order, so that popping from the stack is equivalent to taking the head of the list.
My tweaked version of the interpreter exposes an entrypoint function that assumes this reversal has already happened, hence the confusion. When I cut a new version of my interpreter, I can investigate if it makes sense to push the reversal down further, but an advantage of doing it this way is that the
rev
andmap
operations can be carried out simultaneously, which is more efficient.
conrad-watt submitted PR review.
conrad-watt edited PR review comment.
conrad-watt submitted PR review.
conrad-watt submitted PR review.
alexcrichton submitted PR review.
alexcrichton merged PR #4672.
Last updated: Dec 23 2024 at 12:05 UTC