Jump to content

Find limit of recursion: Difference between revisions

m
No edit summary
Line 762:
 
Outside of debugging access to other vats, E programs are (ideally) not allowed to observe recursion limits, because stack unwinding at an arbitrary point can break invariants of the code that was executing at the time. In particular, consider an attacker who estimates the stack size, nearly fills up the stack to that point, then invokes the victim — If the attacker is allowed to catch our hypothetical StackOverflowException from inside the victim, then there is a good chance of the victim then being in an inconsistent state, which the attacker can then make use of.
 
=={{header|Easyprog.online}}==
 
<lang>func recurse i . .
print i
call recurse i + 1
.
call recurse 0</lang>
 
<output>
0
.
.
999
---------------------------------
| max call depth of 1000 exceeded |
---------------------------------
</output>
 
=={{header|Elixir}}==
2,083

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.