mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Resolving Keccak-256: check if arguments are identifiers early.
Previously, the check on whether the optimization was useful gas wise was done before checking if the keccak256 opcode had identifier as arguments. Since the gas meter crashes when encountering certain Yul opcodes (create, dataoffset, etc.), this optimizer step crashed.
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
// This test used to crash: https://github.com/ethereum/solidity/issues/11801
|
||||
{
|
||||
for {} addmod(keccak256(0x0,create(0x0, 0x0, 0x0)), 0x0, 0x0) {} {}
|
||||
}
|
||||
// ----
|
||||
// step: loadResolver
|
||||
//
|
||||
// {
|
||||
// for { }
|
||||
// addmod(keccak256(0x0, create(0x0, 0x0, 0x0)), 0x0, 0x0)
|
||||
// { }
|
||||
// { }
|
||||
// }
|
||||
Reference in New Issue
Block a user