1

Could a solidity loop silently fail because of stack depth limit, while the contract continues running as if nothing happened?

Shane Fontaine
  • 18,036
  • 20
  • 54
  • 82
Zeratul
  • 11
  • 1

1 Answers1

1

Yes, if the loop contains a call to another contract, it will potentially fail if one of the calls either blows through the stack limit or takes you up close to it, at which point an "innocent" call ends up going over the edge. See How does the stack depth attack make a send() silently fail? and imagine the example there uses a loop rather than calling send() twice.

Edmund Edgar
  • 16,897
  • 1
  • 29
  • 58