From 944230f57b6e26ab8acc93eb79b34e90e6ee5592 Mon Sep 17 00:00:00 2001 From: samyfodil Date: Sat, 18 Jul 2026 07:25:54 -0500 Subject: [PATCH] =?UTF-8?q?test(async):=20fix=20sync-streams=20=E2=80=94?= =?UTF-8?q?=20$D.run=20must=20store=200x89abcdef=20before=20stream.write?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The sync-streams test is symmetric: in the first half $C.get stores 0x01234567 into its buffer and stream.writes it, and $D reads+checks 0x01234567; in the second half $D is meant to store 0x89abcdef into its buffer and stream.write it so $C.set reads+checks 0x89abcdef. But $D.run's second stream.write had no preceding i32.store, so it wrote zero-initialized memory: $C.set read 0x00000000 and its (i32.ne (i32.const 0x89abcdef) ...) assertion trapped on unreachable. No implementation (including the spec reference in definitions.py) can pass the test as written. Add the missing store, mirroring $C.get's own store. --- test/async/sync-streams.wast | 1 + 1 file changed, 1 insertion(+) diff --git a/test/async/sync-streams.wast b/test/async/sync-streams.wast index 364ba9c3..7ef79b43 100644 --- a/test/async/sync-streams.wast +++ b/test/async/sync-streams.wast @@ -139,6 +139,7 @@ ;; (stream.write $tx $bufp 4) will succeed without blocking (local.set $bufp (i32.const 16)) + (i32.store (local.get $bufp) (i32.const 0x89abcdef)) (local.set $ret (call $stream.write (local.get $tx) (local.get $bufp) (i32.const 4))) (if (i32.ne (i32.const 0x40 (; COMPLETED=0 | (4<<4) ;)) (local.get $ret)) (then unreachable))