History log of /wasmtime-44.0.1/tests/misc_testsuite/winch/fuel_stack_alignment.wat (Results 1 – 1 of 1)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: dev, v36.0.9, v44.0.1, v43.0.2, v36.0.8, v24.0.8, v44.0.0, v43.0.1, v42.0.2, v36.0.7, v24.0.7, v43.0.0, v42.0.1, v41.0.4, v42.0.0, v40.0.4, v36.0.6, v24.0.6, v41.0.3, v41.0.2, v41.0.1, v36.0.5, v40.0.3, v41.0.0, v36.0.4, v39.0.2, v40.0.2, v40.0.1, v40.0.0, v39.0.1, v39.0.0, v38.0.4, v37.0.3, v36.0.3, v24.0.5, v38.0.3, v38.0.2, v38.0.1, v37.0.2, v37.0.1, v37.0.0, v36.0.2, v36.0.1, v36.0.0, v35.0.0, v24.0.4, v33.0.2, v34.0.2, v34.0.1, v33.0.1, v24.0.3, v32.0.1, v34.0.0, v33.0.0, v32.0.0, v31.0.0, v30.0.2, v30.0.1, v30.0.0, v29.0.1, v29.0.0, v28.0.1, v28.0.0, v27.0.0, v26.0.1, v25.0.3, v24.0.2
# b5627a86 05-Nov-2024 Saúl Cabrera <[email protected]>

winch: Sync registers and locals before fuel check (#9554)

* winch: Sync registers and locals before fuel check

This commit fixes a fuzz bug in which the stack was misaligned when
calling the out-o

winch: Sync registers and locals before fuel check (#9554)

* winch: Sync registers and locals before fuel check

This commit fixes a fuzz bug in which the stack was misaligned when
calling the out-of-fuel builtin function.

The misalignment was introduced by a erroneous handling of the the
control flow merge introduced by the fuel check conditional. In general,
prior to every branch emission, a spill to memory is needed to avoid
issues at the control flow merge.

Note that we don't have many cases like this one in Winch's codebase (3
in total), however as a follow-up, it's probably worth considering
introducing a stronger abstraction around branching to ensure that this
case is handled whenever an arbitrary branch needs to be introduced.
This change solely focuses on the fix and does not introduce any
refactoring. I plan to follow-up with investigating a better branching
strategy, since we would need to introduce a similar pattern for epoch
handling.

I used `wasm-tools shink` to shrink the original program, which
I decided to add as part of an integration test.

* Move the test fixture

show more ...