Re: sh: 1: /media/mycomputer/Seagate: not found
- Posted by petelomax Jan 31, 2021
- 1412 views
irv said...
Anyway, here's another puzzle for you:
? system_exec("ls ",0) puts(1,"done\n") while 1 do end while
It has driven the compiler into an infinite loop.
In pEmit2.e, procedure scanforShortJmp(), line 723 the branch straightening checks to see if it is jumping to an unconditional jump and if it is, it hops direct to that target, which it also checks.
However if the offset on an unconditional jump is zero so it is jumping to itself, it will "follow that chain" forever:
c2 = s5[c2]+5 offset += c2 -- ;- ) s5[i3] = offset --31/1/21 if c2=0 then exit end if end while
Alternatively, replace the offending loop(s):
--while 1 do end while while 1 do sleep(0.1) end while -- or {} = wait_key()