I have ~1 hour to look into this starting now, so good chance I can't resolve it. Repro:
module []
# happens with strings of length 24 and above
expect("123456789012345678901234" != "")
run roc test
Error message + stack trace:
I can fix this, thanks for the repro!
Np! Meanwhile expanding my mind about the interpreter so that next time I can fix it too :)
I'm pretty sure this is fixed in https://github.com/roc-lang/roc/pull/8527
It's the same issue as https://github.com/roc-lang/roc/issues/8525 I think
I know you're on it, but I'm just using this issue to learn. Sharing this, since first time I used the Zed debugger:
defer -ed decref on lhs and rhs: https://github.com/roc-lang/roc/blob/968e8776e2f69438135b3155829a2d9a556dd201/src/eval/interpreter.zig#L11865
looping through the [lhs, rhs] array and decref-ing them.
https://github.com/roc-lang/roc/blob/968e8776e2f69438135b3155829a2d9a556dd201/src/eval/interpreter.zig#L11962-L11969
https://github.com/roc-lang/roc/pull/8535 includes a fix for this!
it was still reproducing on there
so the earlier PRs didn't fix it
Last updated: Dec 21 2025 at 12:15 UTC