-
-
Notifications
You must be signed in to change notification settings - Fork 670
"For loop" causing infinite loops #1201
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I tried for a couple minutes to get the code snippet running but gave up. No idea what the inputs are supposed to be, but when I throw something random at it it explodes due to accessing arrays out of bounds, which doesn't look like a compiler issue. Suggesting to distill this down to something more easily reproducible, removing any code that isn't strictly necessary to trigger the issue. |
It turned out that I used the mutable variable "j" twice in Line 40 and Line 61. After rename the latter to "k" everything works now. Writing the same code in Javascript it showed the same result. My bad. Closing this issue now |
Hi,
I used this "for loop" in my code:
https://github.com/togekk1/simon-cheng/blob/ded2d0354d1dbaebcf3b296674946412deffa44d/src/wasm/assembly/index.ts#L61-L66
When I put it in to comments as the link above shows, the "render" function runs normally.
When I remove the comment marks from only Line 61 and Line 66, "render" function keeps being executed.
But the array "split_by_or" only has 2 items.
Can you help me look into this? Thanks!
The text was updated successfully, but these errors were encountered: