finite-wasm icon indicating copy to clipboard operation
finite-wasm copied to clipboard

Find a way to verify that our stack analysis is correct

Open nagisa opened this issue 1 year ago • 0 comments

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).

nagisa avatar Jan 11 '23 12:01 nagisa