Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge with upstream #71

Merged
merged 6 commits into from
Mar 15, 2024
Merged

Merge with upstream #71

merged 6 commits into from
Mar 15, 2024

Conversation

dhil
Copy link
Member

@dhil dhil commented Mar 15, 2024

No description provided.

alexcrichton and others added 6 commits March 13, 2024 14:32
Also resolve some deprecation warnings from `indexmap` after updating.
)

* Print custom sections by default in `wasmprinter`

The annotations proposal for WebAssembly added `@custom` syntax to the
text format of WebAssembly and while `wast` has supported parsing it for
quite some time now the `wasmprinter` half has not printed it. This was
mostly just for historical reasons, but this decision ends up causing
confusion for folks when they round-trip a binary through the text
format and are surprised when the result is different. An example of
this is that the `component-type*` custom sections for components are
lost when roundtripping and that can break the componentization process.

This commit updates to instead print these sections by default. That
does mean that many modules coming out of compilers may have lots of
DWARF information now printed, but this feels like a better default than
always ignoring them entirely.

It's worth noting here that `wasmprinter` and `wast` try to round-trip
the structure of a module but won't ever round trip a module
byte-for-byte. For example overlong LEB encodings will never be
reproduced. This means that while this commit will roundtrip custom
sections it won't guarantee that the custom section continues to work
because the offsets within the module when converted back to binary may
still be different.

* Fix some mutation tests to work on 32 and 64-bit

* Normalize WIT comments to `\n` from `\r\n`
…e#1453)

Seems like setting this roughly 50% of the time is fine, since fuzzing often
involves executing the Wasm, and trapping Wasm is generally less interesting
than non-trapping Wasm.
* wasm-smith: Generate "interesting" constants

* review
@dhil dhil merged commit ff0ff35 into wasmfx:main Mar 15, 2024
17 checks passed
@dhil dhil deleted the wasmfx-merge branch March 15, 2024 08:26
dhil pushed a commit that referenced this pull request Jul 12, 2024
* threads: add `shared` tables

This change spreads `shared` attributes on to tables. As with bytecodealliance#1480,
this does not yet turn on fuzzing for `shared` things so the only
checking is via the in-progress test suite in
`tests/local/shared-everything-threads`.

Implementing this raises an issue with the spec: the addition of
`shared` in the text format means that inline table expressions (e.g.,
`(table <type> (elem ...))`) are difficult to parse: the parser would
potentially have to look past two tokens now, `shared` and `i32|i64` to
see if a type appears that indicates we should be parsing an inline
format. There are multiple options for what to do here; I opened an
issue to figure this out at the spec level first ([#71]).

[proposal]: https://github.com/WebAssembly/shared-everything-threads
[#71]: WebAssembly/shared-everything-threads#71

* Add a 'missing-features' test for `shared` tables

* Add a negative test for indexed types
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.

4 participants