vyper Version (output of vyper --version OR linkable commit hash vyperlang/vyper@): vyperlang/vyper@b43fface148b45cbd2c90b5d24f77398a63745b5
Issue Description
_stack_peephole_opts() tries to perform 5 different optimizations at
each index i of the assembly using a while loop. However, the last two
optimizations, when performed do not continue the loop, which means
that:
i is incremented by 1, leading to skipping the next instruction
and potentially missing an optimization.
If both optimizations are performed for a given i, it might be
that the second one tries accessing an index that is out of range
given that the first one removed the 2 last elements of the array
and the check for the index is not performed in between the two
optimizations.
Version Information
vyper --version
OR linkable commit hash vyperlang/vyper@Issue Description
_stack_peephole_opts()
tries to perform 5 different optimizations at each indexi
of the assembly using a while loop. However, the last two optimizations, when performed do notcontinue
the loop, which means that:i
is incremented by 1, leading to skipping the next instruction and potentially missing an optimization.i
, it might be that the second one tries accessing an index that is out of range given that the first one removed the 2 last elements of the array and the check for the index is not performed in between the two optimizations.