MCPcopy Create free account
hub / github.com/argotorg/solidity / generate

Method generate

test/tools/ossfuzz/SolidityCustomMutatorInterface.cpp:59–69  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

57{}
58
59size_t SolidityCustomMutatorInterface::generate()
60{
61 std::string testCase = generator->generateTestProgram();
62 solAssert(
63 !testCase.empty() && data,
64 "Solc custom mutator: Invalid mutant or memory pointer"
65 );
66 size_t mutantSize = std::min(testCase.size(), maxMutantSize - 1);
67 mempcpy(data, testCase.data(), mutantSize);
68 return mutantSize;
69}

Callers 1

LLVMFuzzerCustomMutatorFunction · 0.45

Calls 4

generateTestProgramMethod · 0.80
emptyMethod · 0.45
sizeMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected