Skip to content

Commit bd9b92c

Browse files
authored
Merge pull request #14806 from ethereum/fuzz-blobhash
Yul fuzzer: Support blobhash(uint) global function
2 parents a439996 + ed96eb2 commit bd9b92c

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

Diff for: test/tools/ossfuzz/protoToYul.cpp

+9
Original file line numberDiff line numberDiff line change
@@ -599,6 +599,12 @@ void ProtoConverter::visit(UnaryOp const& _x)
599599
return;
600600
}
601601

602+
if (op == UnaryOp::BLOBHASH && !m_evmVersion.hasBlobHash())
603+
{
604+
m_output << dictionaryToken();
605+
return;
606+
}
607+
602608
// The following instructions may lead to change of EVM state and are hence
603609
// excluded to avoid false positives.
604610
if (
@@ -647,6 +653,9 @@ void ProtoConverter::visit(UnaryOp const& _x)
647653
case UnaryOp::BLOCKHASH:
648654
m_output << "blockhash";
649655
break;
656+
case UnaryOp::BLOBHASH:
657+
m_output << "blobhash";
658+
break;
650659
}
651660
m_output << "(";
652661
if (op == UnaryOp::MLOAD)

Diff for: test/tools/ossfuzz/yulProto.proto

+1
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,7 @@ message UnaryOp {
156156
EXTCODEHASH = 7;
157157
BALANCE = 8;
158158
BLOCKHASH = 9;
159+
BLOBHASH = 10;
159160
}
160161
required UOp op = 1;
161162
required Expression operand = 2;

0 commit comments

Comments
 (0)