go-pulse/tests/fuzzers/stacktrie/debug/main.go
2021-11-10 12:43:46 -06:00

24 lines
407 B
Go

package main
import (
"fmt"
"io/ioutil"
"os"
"gitlab.com/pulsechaincom/go-pulse/tests/fuzzers/stacktrie"
)
func main() {
if len(os.Args) != 2 {
fmt.Fprintf(os.Stderr, "Usage: debug <file>")
os.Exit(1)
}
crasher := os.Args[1]
data, err := ioutil.ReadFile(crasher)
if err != nil {
fmt.Fprintf(os.Stderr, "error loading crasher %v: %v", crasher, err)
os.Exit(1)
}
stacktrie.Debug(data)
}