Fabcoin Core
0.16.2
P2P Digital Currency
|
#include <fuzzHelper.h>
Static Public Member Functions | |
static std::string | generate (int _maxOpNumber=1, RandomCodeOptions _options=RandomCodeOptions()) |
Generate random vm code. More... | |
static void | parseTestWithTypes (std::string &_test, std::map< std::string, std::string > const &_varMap) |
Replace keywords in given string with values. More... | |
static std::string | rndByteSequence (int _length=1, SizeStrictness _sizeType=SizeStrictness::Strict) |
Generate random byte string of a given length. More... | |
static std::string | rndRLPSequence (int _depth, std::string &_debug) |
Generate random rlp byte sequence of a given depth (e.g [[[]],[]]). More... | |
static std::string | randomUniIntHex (u256 _maxVal=0) |
Generate random int64. More... | |
static u256 | randomUniInt (u256 _maxVal=0) |
Static Private Member Functions | |
static std::string | fillArguments (dev::eth::Instruction _opcode, RandomCodeOptions const &_options) |
static std::string | getPushCode (int _value) |
static std::string | getPushCode (std::string const &_hex) |
static int | recursiveRLP (std::string &_result, int _depth, std::string &_debug) |
static void | refreshSeed () |
static std::vector< std::string > | getTypes () |
Static Private Attributes | |
static boost::random::mt19937 | gen |
Random generator. More... | |
static boostIntDistrib | opCodeDist = boostIntDistrib (0, 255) |
0..255 opcodes More... | |
static boostIntDistrib | opLengDist = boostIntDistrib (1, 32) |
1..32 byte string More... | |
static boostIntDistrib | uniIntDist = boostIntDistrib (0, 0x7fffffff) |
0..0x7fffffff More... | |
static boostUint64Distrib | uInt64Dist = boostUint64Distrib (0, std::numeric_limits<uint64_t>::max()) |
0..2**64 More... | |
static boostIntGenerator | randUniIntGen = boostIntGenerator(gen, uniIntDist) |
Generate random UniformInt from uniIntDist. More... | |
static boostIntGenerator | randOpCodeGen = boostIntGenerator(gen, opCodeDist) |
Generate random value from opCodeDist. More... | |
static boostIntGenerator | randOpLengGen = boostIntGenerator(gen, opLengDist) |
Generate random length from opLengDist. More... | |
static boostUInt64Generator | randUInt64Gen = boostUInt64Generator(gen, uInt64Dist) |
Generate random uInt64. More... | |
Definition at line 75 of file fuzzHelper.h.
|
staticprivate |
Definition at line 287 of file fuzzHelper.cpp.
|
static |
Generate random vm code.
Definition at line 205 of file fuzzHelper.cpp.
|
staticprivate |
Definition at line 281 of file fuzzHelper.cpp.
|
staticprivate |
|
staticprivate |
Definition at line 286 of file createRandomTest.cpp.
|
static |
Replace keywords in given string with values.
Parse Test string replacing keywords to fuzzed values.
Definition at line 209 of file createRandomTest.cpp.
Definition at line 259 of file fuzzHelper.cpp.
|
static |
Generate random int64.
Definition at line 248 of file fuzzHelper.cpp.
|
staticprivate |
Definition at line 45 of file fuzzHelper.cpp.
|
staticprivate |
|
static |
Generate random byte string of a given length.
Definition at line 191 of file fuzzHelper.cpp.
|
static |
Generate random rlp byte sequence of a given depth (e.g [[[]],[]]).
max depth level = 20. The _debug string contains returned rlp string with analysed sections [] - length section/ or single byte rlp encoding () - decimal representation of length {1} - Array {2} - Array more than 55 {3} - List {4} - List more than 55
Definition at line 182 of file fuzzHelper.cpp.
|
staticprivate |
Random generator.
Definition at line 109 of file fuzzHelper.h.
|
staticprivate |
0..255 opcodes
Definition at line 110 of file fuzzHelper.h.
|
staticprivate |
1..32 byte string
Definition at line 111 of file fuzzHelper.h.
|
staticprivate |
Generate random value from opCodeDist.
Definition at line 116 of file fuzzHelper.h.
|
staticprivate |
Generate random length from opLengDist.
Definition at line 117 of file fuzzHelper.h.
|
staticprivate |
Generate random uInt64.
Definition at line 118 of file fuzzHelper.h.
|
staticprivate |
Generate random UniformInt from uniIntDist.
Definition at line 115 of file fuzzHelper.h.
|
staticprivate |
0..2**64
Definition at line 113 of file fuzzHelper.h.
|
staticprivate |
0..0x7fffffff
Definition at line 112 of file fuzzHelper.h.