Stream: git-wasmtime

Topic: wasmtime / PR #14705 bench-api: breaking ABI updates to e...


view this post on Zulip Wasmtime GitHub notifications bot (Oct 13 2026 at 16:33):

fitzgen opened PR #14705 from fitzgen:bench-api-updates to bytecodealliance:main:

See each commit for details.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 13 2026 at 16:33):

fitzgen requested dicej for a review on PR #14705.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 13 2026 at 16:33):

fitzgen requested wasmtime-core-reviewers for a review on PR #14705.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 13 2026 at 16:38):

:memo: alexcrichton submitted PR review:

I might recommend using a version field rather than a size field (or maybe both?) -- I've had some good experience with that in the past over in wit-bindgen. With just a size field then it might still be possible to read uninitialized padding bytes for example where trailing bools might not resize the structure due to padding but are otherwise uninitialized. With a version field where documentation can be added for "this field was added in this version" that might help with that problem.

IIRC I've seen other C libraries have a version field as well, such as with the curl library.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 13 2026 at 16:42):

fitzgen commented on PR #14705:

Good idea, I didn't think about trailing padding.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 13 2026 at 16:47):

alexcrichton commented on PR #14705:

If it's helpful, this is what curl does

view this post on Zulip Wasmtime GitHub notifications bot (Oct 13 2026 at 17:06):

fitzgen updated PR #14705.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 13 2026 at 17:06):

fitzgen commented on PR #14705:

Updated to include a version field as well.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 13 2026 at 17:14):

:thumbs_up: alexcrichton submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 13 2026 at 17:14):

:speech_balloon: alexcrichton created PR review comment:

I think this might technically be unsound given MIRI-style rules because this is aserting that all of config is valid initialized memory for WasmBenchConfig which isn't the case for padding bytes an added fields. I think the only 100% safe way to model this would be to preserve the raw pointer under-the-hood and go to fields through raw pointers (not through &WasmBenchConfig).

Another possible example is if the latest version is version 2, but this is given version 1. In that case the accessor of cache below currently goes through &WasmBenchConfig but that pointer is actually invalid for version 1 because version 2 presumably added more fields so we'd be tricking rustc into thinking there's more fields than there actually are.

This is a pretty minor concern though and may not actually end up causing any issues in practice.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 13 2026 at 18:06):

fitzgen updated PR #14705.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 13 2026 at 18:06):

:memo: fitzgen submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 13 2026 at 18:06):

:speech_balloon: fitzgen created PR review comment:

I pushed a new commit that should address this. Mind taking another look?

view this post on Zulip Wasmtime GitHub notifications bot (Oct 13 2026 at 18:10):

:thumbs_up: alexcrichton submitted PR review:

mmm love me some macros

view this post on Zulip Wasmtime GitHub notifications bot (Oct 13 2026 at 18:10):

alexcrichton has enabled auto merge for PR #14705.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 13 2026 at 18:15):

alexcrichton added PR #14705 bench-api: breaking ABI updates to enable future extensibility and add a cache option to the merge queue.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 13 2026 at 18:43):

:check: alexcrichton merged PR #14705.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 13 2026 at 18:43):

alexcrichton removed PR #14705 bench-api: breaking ABI updates to enable future extensibility and add a cache option from the merge queue.


Last updated: Oct 31 2026 at 23:03 UTC