File tree Expand file tree Collapse file tree 2 files changed +3
-18
lines changed Expand file tree Collapse file tree 2 files changed +3
-18
lines changed Original file line number Diff line number Diff line change @@ -71,11 +71,6 @@ DEFINE_PROTO_FUZZER(Program const& _input)
71
71
of.write (yul_source.data (), static_cast <streamsize>(yul_source.size ()));
72
72
}
73
73
74
- // Do not proceed with tests that are too large. 1200 is an arbitrary
75
- // threshold.
76
- if (yul_source.size () > 1200 )
77
- return ;
78
-
79
74
YulStringRepository::reset ();
80
75
81
76
solidity::frontend::OptimiserSettings settings = solidity::frontend::OptimiserSettings::full ();
@@ -162,18 +157,6 @@ DEFINE_PROTO_FUZZER(Program const& _input)
162
157
ostringstream optimizedState;
163
158
optimizedState << EVMHostPrinter{hostContext, deployResultOpt.create_address }.state ();
164
159
165
- int64_t constexpr tolerance = 1000 ;
166
- if (callResult.gas_left > callResultOpt.gas_left )
167
- if (callResult.gas_left - callResultOpt.gas_left > tolerance)
168
- {
169
- cout << " Gas differential " << callResult.gas_left - callResultOpt.gas_left << endl;
170
- cout << " Unoptimised bytecode" << endl;
171
- cout << util::toHex (unoptimisedByteCode) << endl;
172
- cout << " Optimised bytecode" << endl;
173
- cout << util::toHex (optimisedByteCode) << endl;
174
- solAssert (false , " Optimised code consumed more than +1000 gas." );
175
- }
176
-
177
160
solAssert (
178
161
unoptimizedState.str () == optimizedState.str (),
179
162
" State of unoptimised and optimised stack reused code do not match."
Original file line number Diff line number Diff line change @@ -1348,7 +1348,9 @@ void ProtoConverter::visit(Statement const& _x)
1348
1348
m_output << " continue\n " ;
1349
1349
break ;
1350
1350
case Statement::kLogFunc :
1351
- visit (_x.log_func ());
1351
+ // Log is a stateful statement since it writes to storage.
1352
+ if (!m_filterStatefulInstructions)
1353
+ visit (_x.log_func ());
1352
1354
break ;
1353
1355
case Statement::kCopyFunc :
1354
1356
visit (_x.copy_func ());
You can’t perform that action at this time.
0 commit comments