MCPcopy Create free account
hub / github.com/CPChain/chain / Fuzz

Function Fuzz

core/vm/runtime/fuzz.go:25–36  ·  view source on GitHub ↗

Fuzz is the basic entry point for the go-fuzz tool This returns 1 for valid parsable/runable code, 0 for invalid opcode.

(input []byte)

Source from the content-addressed store, hash-verified

23// This returns 1 for valid parsable/runable code, 0
24// for invalid opcode.
25func Fuzz(input []byte) int {
26 _, _, err := Execute(input, input, &Config{
27 GasLimit: 3000000,
28 })
29
30 // invalid opcode
31 if err != nil && len(err.Error()) > 6 && string(err.Error()[:7]) == "invalid" {
32 return 0
33 }
34
35 return 1
36}

Callers

nothing calls this directly

Calls 2

ExecuteFunction · 0.85
ErrorMethod · 0.65

Tested by

no test coverage detected