Open
Description
Unlike with the gas analysis, relying on an interpreter is not such useful of an approach. The interpreter will only explore one path of execution, which wouldn’t necessarily yield a maximum stack usage for the given function. While the stack analysis results can be used to establish a maximum that an interpreter shouldn’t exceed (and the test would fail if the stack usage for the function does in fact exceed the limit), this also requires a O(n)
check for each instruction executed due to how the interpreter represents the values’ stack (a linked list).