Skip to content

Conversation

@tlively
Copy link
Member

@tlively tlively commented Aug 20, 2024

The leading bytes that indicate what kind of heap type is being defined
are bytes, but we were previously treating them as SLEB128-encoded
values. Since we emit the smallest LEB encodings possible, we were
writing the correct bytes in output files, but we were also improperly
accepting binaries that used more than one byte to encode these values.
This was caught by an upstream spec test.

@tlively tlively requested a review from kripken August 20, 2024 20:17
@@ -1,963 +0,0 @@
;; Unsigned LEB128 can have non-minimal length
Copy link
Member

Choose a reason for hiding this comment

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

Is this test invalid? I'd expect a fix to allow more tests to run, so it's not obvious to me why a test was removed.

Copy link
Member Author

Choose a reason for hiding this comment

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

It's removed because we can now run the upstream version at test/spec/testsuite/binary-leb128.wast.

}

if (rawAlignment > 8) {
if (rawAlignment >= 8) {
Copy link
Member

Choose a reason for hiding this comment

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

Separate fix?

Base automatically changed from testsuite-submodule to main August 21, 2024 00:16
The leading bytes that indicate what kind of heap type is being defined
are bytes, but we were previously treating them as SLEB128-encoded
values. Since we emit the smallest LEB encodings possible, we were
writing the correct bytes in output files, but we were also improperly
accepting binaries that used more than one byte to encode these values.
This was caught by an upstream spec test.
@tlively tlively merged commit 9772dc6 into main Aug 21, 2024
@tlively tlively deleted the testsuite-fix-1 branch August 21, 2024 01:20
@gkdn gkdn mentioned this pull request Aug 31, 2024
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