2020-12-11 10:06:44 +00:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
|
|
|
"fmt"
|
|
|
|
"os"
|
|
|
|
|
|
|
|
"github.com/ethereum/go-ethereum/tests/fuzzers/difficulty"
|
|
|
|
)
|
|
|
|
|
|
|
|
func main() {
|
|
|
|
if len(os.Args) != 2 {
|
|
|
|
fmt.Fprintf(os.Stderr, "Usage: debug <file>")
|
|
|
|
os.Exit(1)
|
|
|
|
}
|
|
|
|
crasher := os.Args[1]
|
2022-05-16 09:59:35 +00:00
|
|
|
data, err := os.ReadFile(crasher)
|
2020-12-11 10:06:44 +00:00
|
|
|
if err != nil {
|
|
|
|
fmt.Fprintf(os.Stderr, "error loading crasher %v: %v", crasher, err)
|
|
|
|
os.Exit(1)
|
|
|
|
}
|
|
|
|
difficulty.Fuzz(data)
|
|
|
|
}
|