Mysterious scm-sp bug
For an as-of-yet unknown reason, certain programs compile to wasm that does not save/restore the scm stack properly. Depending on the value of $scm-sp
, this bug appears to uses as a runtime exception due to a table.get
with a negative index or a ref.cast
failure.
Finding a minimal reproducer program has been a challenge, but (un)fortunately we have the wip-fixie
branch (that contains fixes to our ports implementation) that is currently exposing the bug. Start investigation there.