ladybird/Libraries/LibWasm/Tests/Executor
sideshowbarker 59eb221d7c LibWasm: Fix “return” leaking intermediate value-stack entries to caller
Problem: Loading WebAssembly modules that use “return” mid-function can
corrupt the heap and crash the browser.

Cause: HANDLE_INSTRUCTION(return_) shrank the label stack but left any
working values pushed before the “return” instruction on the shared
value stack. Those residuals leaked into the caller’s frame and
accumulated across calls — until they overflowed the value stack’s
inline storage and corrupted adjacent allocator metadata.

Fix: After shrinking the label stack down to the function-level label,
also remove value-stack entries between that label’s recorded
stack_height and the top .arity() result values — mirroring the cleanup
that branch_to_label<true> already performs for br/br_if.

Fixes https://github.com/LadybirdBrowser/ladybird/issues/9614
2026-05-25 09:00:44 +02:00
..
test-const-local-local-fusion.js LibWasm: Use the right indices for i64 constlocal fused ops 2026-02-23 00:22:47 +01:00
test-memfill-memidx.js
test-memory_fill-order.js LibWasm: Take memory_fill arguments in the right order 2025-10-04 11:17:08 +02:00
test-return-mid-function.js LibWasm: Fix “return” leaking intermediate value-stack entries to caller 2026-05-25 09:00:44 +02:00
test-zero-local-cross-module-memory.js LibWasm: Add a regression test for cross-module memory access 2026-05-10 16:41:42 +02:00