Stream: git-wasmtime

Topic: wasmtime / PR #14645 cranelift: flush buffered startup fu...


view this post on Zulip Wasmtime GitHub notifications bot (Oct 09 2026 at 23:46):

ctiller opened PR #14645 from ctiller:fix/startup-static-memory-fuel to bytecodealliance:main:

During FuncTranslator::translate_module_startup, fuel costs from earlier startup instructions (such as global.init constant expressions) are buffered in self.fuel_consumed until flushed into the SSA self.fuel_var.

In FuncEnvironment::translate_static_memory_init, the copy-on-write check branches directly to end_block (brif(is_null, end_block, init_block)), while self.fuel_consumed was only flushed inside init_block via fuel_consume_for_bulk_op. When the CoW fast path was taken (is_null != 0), init_block was skipped and the buffered compile-time startup fuel was lost.

Call self.fuel_increment_var(builder) before brif(is_null, end_block, init_block) when consume_fuel is enabled so both arms of the branch see the prior startup fuel.

Assisted-by: Gemini

view this post on Zulip Wasmtime GitHub notifications bot (Oct 09 2026 at 23:46):

ctiller requested fitzgen for a review on PR #14645.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 09 2026 at 23:46):

ctiller requested wasmtime-compiler-reviewers for a review on PR #14645.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 09 2026 at 23:46):

ctiller requested wasmtime-core-reviewers for a review on PR #14645.

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

:thumbs_up: alexcrichton submitted PR review:

Thanks!

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

alexcrichton added PR #14645 cranelift: flush buffered startup fuel before static data segment branch to the merge queue.

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

github-merge-queue[bot] removed PR #14645 cranelift: flush buffered startup fuel before static data segment branch from the merge queue.

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

alexcrichton commented on PR #14645:

@ctiller would you be up for resolving CI and rebasing here too?

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

ctiller updated PR #14645.

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

cfallin added PR #14645 cranelift: flush buffered startup fuel before static data segment branch to the merge queue.

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

github-merge-queue[bot] removed PR #14645 cranelift: flush buffered startup fuel before static data segment branch from the merge queue.

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

cfallin commented on PR #14645:

@ctiller it looks like this is yet again a merge conflict as one of your other PRs merged first -- could you resolve again?

(In the future if submitting a cluster of PRs that will mutually conflict, we're happier to take a slightly larger single PR with everything pre-merged, if that's easier -- it certainly reduces this kind of churn for us!)

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

cfallin edited a comment on PR #14645:

@ctiller it looks like this is yet again a merge conflict as one of your other PRs merged first -- could you resolve again?

(In the future if submitting a cluster of PRs that will mutually conflict, we're happy to take a slightly larger single PR with everything pre-merged, if that's easier -- it certainly reduces this kind of churn for us!)

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

fitzgen removed the review request for fitzgen from PR #14645.


Last updated: Oct 31 2026 at 23:03 UTC