github.com/phillinzzz/newBsc@v1.1.6/tests/fuzzers/stacktrie/debug/main.go (about) 1 package main 2 3 import ( 4 "fmt" 5 "io/ioutil" 6 "os" 7 8 "github.com/phillinzzz/newBsc/tests/fuzzers/stacktrie" 9 ) 10 11 func main() { 12 if len(os.Args) != 2 { 13 fmt.Fprintf(os.Stderr, "Usage: debug <file>") 14 os.Exit(1) 15 } 16 crasher := os.Args[1] 17 data, err := ioutil.ReadFile(crasher) 18 if err != nil { 19 fmt.Fprintf(os.Stderr, "error loading crasher %v: %v", crasher, err) 20 os.Exit(1) 21 } 22 stacktrie.Debug(data) 23 }