Open smoelius opened 4 years ago
Yes -- the static analysis will error on this, and the tests in vm::tests
are intended to circumvent the analysis to test how the VM behaves with code that hasn't been analyzed. In any case, the VM should be able to catch these kinds of recursive calls, so this is a bug.
I think I hit this issue while working on traits and fixed it - https://github.com/blockstack/blockstack-core/commit/8faade53f7507964dfe9475af0f028d6e6293ecb
I added the below
test_mutually_recursive_contracts
here: https://github.com/trailofbits/x-audit-blockstack-core/blob/e2d3d5bae539d242851620e28129af6c4a9de642/src/vm/tests/contracts.rs#L685 and it passes, though it seems like it shouldn't. Is this "cheating" in some way, e.g., is there analysis pass that is being skipped?