mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-26 06:36:43 +00:00
fuzz/evm: added EVM fuzzer (go-fuzz)
This commit is contained in:
parent
1f8e723821
commit
aeb272ef5e
1 changed files with 11 additions and 0 deletions
11
fuzz/evm/main.go
Normal file
11
fuzz/evm/main.go
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
package evm
|
||||
|
||||
import "github.com/ethereum/go-ethereum/core/vm/runtime"
|
||||
|
||||
func Fuzz(data []byte) int {
|
||||
ret, _, err := runtime.Execute(data, data, &runtime.Config{GasLimit: 5000000})
|
||||
if err != nil && ret != nil {
|
||||
panic("ret != nil on error")
|
||||
}
|
||||
return 1
|
||||
}
|
||||
Loading…
Reference in a new issue