The Yul optimizer incorrectly replaces MLOAD
and SLOAD
calls with values that have been previously written to the load location. This can only happen if ABIEncoderV2 is activated and the experimental Yul optimizer has been activated manually in addition to the regular optimizer in the compiler settings. This is due to a compiler bug introduced in v0.5.14
and fixed in v0.5.15
. (see here)
- Incorrect Loads YUL Optimizer
- ABIEncoderV2 <- YUL
- MLOAD/SLOAD Calls
- Calls Replaced -> State Values
- Compiler Bug -> Fixed
solc 0.5.14
-> 0.5.15