Skip to content

Latest commit

 

History

History
17 lines (17 loc) · 871 Bytes

Incorrect byte instruction optimization.md

File metadata and controls

17 lines (17 loc) · 871 Bytes

The optimizer incorrectly handles byte opcodes whose second argument is 31 or a constant expression that evaluates to 31. This can result in unexpected values. This can happen when performing index access on bytesNN types with a compile time constant value (not index) of 31 or when using the byte opcode in inline assembly. This is due to a compiler bug introduced in v0.5.5 and fixed in v0.5.7. (see here)


Slide Screenshot

086.jpg


Slide Text

  • byte Opcodes Second Arg = 31
  • Optimizer bytesNN Index or byte
  • Unexpected Value
  • Compiler Bug -> Fixed
  • solc 0.5.5 -> 0.5.7

References

  • Youtube Reference

Tags