When you make a list of words by splitting a string, the program thinks the list is much longer than it really is — looping over it runs too many times and then crashes. Lists you write out by hand work fine.
Canonical message
Iteration over a list<string> returned by string.split runs many more times than the list actually contains; loop body that calls .length() on the bound variable WASM-traps because garbage memory past the real elements is dereferenced as a string. Literal list<string> iteration works correctly — the bug is in how .split() result interacts with iterate.
server
0.30.325
codegen
1
1
56.0
2026-06-19 17:31:52
2026-06-19 17:31:52
Latest Report Context
bug
runtime
Iteration over a list returned by string.split runs many more times than the list actually contains; loop body that calls .length() on the bound variable WASM-traps because garbage memory past the real elements is dereferenced as a string. Literal list iteration works correctly — the bug is in how .split() result interacts with iterate.
Fix Information
●●●●● resolved
1.9.55
dev-team
2026-06-19 21:29:47
79293bb
Same root cause as HOST_BRIDGE_STRING_SPLIT_RETURNS_JSON_STRING_NOT_LIST. clean-server string.split host bridge was returning a JSON-encoded length-prefixed string instead of a list layout pointer. Compiler-emitted iterate then read the JSON byte length (17) as list size and walked garbage past the JSON body. Fix: bridge now allocates the proper list layout (16-byte header + N*4-byte element pointers) and returns the list pointer.