You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Here are two functions I'd expect to behave identically:
function wheee0()
i = 0
while true
try
if i == 0
print(".")
end
i += 1
peakflops(1954784290346684782)
catch
end
end
end
function wheee1()
i = 0
while true
try
i += 1
if i == 1
print(".")
end
peakflops(1954784290346684782)
catch
end
end
end
When I run wheee0(), i never increments and my screen gets filled with .. When I run wheee1(), I get a single ., as expected.
Additionally, accessing i inside the while loop, (either inside the catch block of after the entire try/catch expression) causes wheee0 to behave as expected. Accessing i after the while loop has no effect.
I ran into this while trying to create a small, reproducible, test case for some strange behavior on a bad peakflops call, but replacing peakflops with something else that throws an exception (or just throwing an exception with throw) doesn't seem to change the behavior here.
The text was updated successfully, but these errors were encountered:
Here are two functions I'd expect to behave identically:
When I run
wheee0()
,i
never increments and my screen gets filled with.
. When I runwheee1()
, I get a single.
, as expected.Additionally, accessing
i
inside the while loop, (either inside the catch block of after the entire try/catch expression) causeswheee0
to behave as expected. Accessingi
after the while loop has no effect.I ran into this while trying to create a small, reproducible, test case for some strange behavior on a bad
peakflops
call, but replacingpeakflops
with something else that throws an exception (or just throwing an exception with throw) doesn't seem to change the behavior here.The text was updated successfully, but these errors were encountered: