solidity icon indicating copy to clipboard operation
solidity copied to clipboard

Investigate InvalidDeposit error during code transform (instead of StackTooDeep).

Open ekpyron opened this issue 4 years ago • 1 comments

Came up during fuzzing https://github.com/ethereum/solidity/pull/10015

This test case: https://gist.github.com/bshastry/06a1132d5bc47835284a0b5aaecf646a produces an InvalidDeposit error during the code transform, while it probably should emit a StackTooDeep error.

ekpyron avatar Apr 15 '21 11:04 ekpyron

Here is a Solidity program that triggers it via optimized assembly

$ solc --optimize --asm test.sol

where test.sol is

contract C {
  function f() public returns (uint96 o0)
  {
    assembly
    {
      for { o0 :=1 } false { }
      {
        // Dummy assembly function with 3 inputs and 17 outputs
        function af0(i0, i1, i2) -> ao0, ao1, ao2, ao3, ao4, ao5, ao6, ao7, ao8, ao9, ao10, ao11, ao12, ao13, ao14, ao15, a016 {}
      }
    }
  }
}

bshastry avatar May 17 '22 09:05 bshastry

Harmless enough to ignore, since we're moving to via-IR in the long-term.

ekpyron avatar Nov 17 '22 11:11 ekpyron