mirror of
				https://github.com/ethereum/solidity
				synced 2023-10-03 13:03:40 +00:00 
			
		
		
		
	Merge pull request #11216 from ethereum/fix-abiv2-fuzzer-bug
Fix use of const ref in Abiv2 and other proto fuzzers.
This commit is contained in:
		
						commit
						6941143613
					
				| @ -58,8 +58,9 @@ DEFINE_PROTO_FUZZER(Contract const& _contract) | ||||
| 		// We target the default EVM which is the latest
 | ||||
| 		langutil::EVMVersion version; | ||||
| 		EVMHost hostContext(version, evmone); | ||||
| 		string contractName = ":C"; | ||||
| 		CompilerInput cInput(version, {{"test.sol", contractSource}}, contractName, OptimiserSettings::minimal(), {}); | ||||
| 		string contractName = "C"; | ||||
| 		StringMap source({{"test.sol", contractSource}}); | ||||
| 		CompilerInput cInput(version, source, contractName, OptimiserSettings::minimal(), {}); | ||||
| 		EvmoneUtility evmoneUtil( | ||||
| 			hostContext, | ||||
| 			cInput, | ||||
|  | ||||
| @ -61,7 +61,7 @@ struct CompilerInput | ||||
| 	langutil::EVMVersion evmVersion; | ||||
| 	/// Source code to be compiled
 | ||||
| 	StringMap const& sourceCode; | ||||
| 	/// Contract name
 | ||||
| 	/// Contract name without a colon prefix
 | ||||
| 	std::string contractName; | ||||
| 	/// Optimiser setting to be used during compilation
 | ||||
| 	frontend::OptimiserSettings optimiserSettings; | ||||
|  | ||||
| @ -48,9 +48,10 @@ DEFINE_PROTO_FUZZER(Contract const& _input) | ||||
| 	// We target the default EVM which is the latest
 | ||||
| 	langutil::EVMVersion version; | ||||
| 	EVMHost hostContext(version, evmone); | ||||
| 	string contractName = ":C"; | ||||
| 	string contractName = "C"; | ||||
| 	string methodName = "test()"; | ||||
| 	CompilerInput cInput(version, {{"test.sol", contract_source}}, contractName, OptimiserSettings::minimal(), {}); | ||||
| 	StringMap source({{"test.sol", contract_source}}); | ||||
| 	CompilerInput cInput(version, source, contractName, OptimiserSettings::minimal(), {}); | ||||
| 	EvmoneUtility evmoneUtil( | ||||
| 		hostContext, | ||||
| 		cInput, | ||||
|  | ||||
| @ -66,10 +66,11 @@ DEFINE_PROTO_FUZZER(Program const& _input) | ||||
| 	// We target the default EVM which is the latest
 | ||||
| 	langutil::EVMVersion version; | ||||
| 	EVMHost hostContext(version, evmone); | ||||
| 	string contractName = ":C"; | ||||
| 	string contractName = "C"; | ||||
| 	string libraryName = converter.libraryTest() ? converter.libraryName() : ""; | ||||
| 	string methodName = "test()"; | ||||
| 	CompilerInput cInput(version, {{"test.sol", sol_source}}, contractName, OptimiserSettings::minimal(), {}); | ||||
| 	StringMap source({{"test.sol", sol_source}}); | ||||
| 	CompilerInput cInput(version, source, contractName, OptimiserSettings::minimal(), {}); | ||||
| 	EvmoneUtility evmoneUtil( | ||||
| 		hostContext, | ||||
| 		cInput, | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user