This program:
(module
(memory (export "mem") 65536 65536 shared)
(func (export "run") (param $end i32)
(local $i i32)
(block $done
(loop $l
(br_if $done (i32.ge_u (local.get $i) (local.get $end)))
(drop (memory.atomic.wait32 (local.get $i) (i32.const 0) (i64.const 0)))
(local.set $i (i32.add (local.get $i) (i32.const 4)))
(br $l)
)
)
)
)
when invoked as:
$ wasmtime -Wshared-memory --invoke run foo.wat 1000000000
will consume an unbounded amount of memory allocating wait queues on addresses which are never cleaned up (within Wasmtime's ParkingSpot implementation)
This program:
when invoked as:
will consume an unbounded amount of memory allocating wait queues on addresses which are never cleaned up (within Wasmtime's
ParkingSpotimplementation)