Advertisement
Guest User

Untitled

a guest
Oct 20th, 2019
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.27 KB | None | 0 0
  1. docker run -it gcr.io/fuzzit-public/buster-golang12:2dc7875 /bin/bash
  2.  
  3. # Download this example
  4. go get github.com/fuzzitdev/example-go
  5. cd /go/src/github.com/fuzzitdev/example-go
  6.  
  7. # building instrumented version of the code together with libFuzzer integration
  8. go-fuzz-build -libfuzzer -o parse-complex.a .
  9. clang -fsanitize=fuzzer parse-complex.a -o parse-complex
  10.  
  11. ./parse-complex
  12.  
  13. # The output will be as follows:
  14. ##1293550 NEW ft: 10 corp: 6/26b lim: 4096 exec/s: 76091 rss: 25Mb L: 5/5 MS: 1 CopyPart-
  15. #panic: runtime error: index out of range
  16. #
  17. #goroutine 17 [running, locked to thread]:
  18. #github.com/fuzzitdev/example-go/pkg/parser.ParseComplex.func5(...)
  19. # /go/src/github.com/fuzzitdev/example-go/pkg/parser/parse_complex.go:5
  20. #github.com/fuzzitdev/example-go/pkg/parser.ParseComplex(0x2aabb20, 0x5, 0x5, 0xc00001e040)
  21. # /go/src/github.com/fuzzitdev/example-go/pkg/parser/parse_complex.go:5 +0x1b2
  22. #github.com/fuzzitdev/example-go/pkg/parser.Fuzz(...)
  23. # /go/src/github.com/fuzzitdev/example-go/pkg/parser/parse_complex_fuzz.go:6
  24. #main.LLVMFuzzerTestOneInput(0x2aabb20, 0x5, 0x545b78)
  25. # /tmp/go-fuzz-build316206684/gopath/src/github.com/fuzzitdev/example-go/pkg/parser/go.fuzz.main/main.go:35 +0x84
  26. #main._cgoexpwrap_90699947e885_LLVMFuzzerTestOneInput(0x2aabb20, 0x5, 0x2aaab10)
  27. # _cgo_gotypes.go:64 +0x37
  28. #==4262== ERROR: libFuzzer: deadly signal
  29. # #0 0x45c110 in __sanitizer_print_stack_trace (/go/src/github.com/fuzzitdev/example-go/parser-fuzz.libfuzzer+0x45c110)
  30. # #1 0x43b79b in fuzzer::PrintStackTrace() (/go/src/github.com/fuzzitdev/example-go/parser-fuzz.libfuzzer+0x43b79b)
  31. # #2 0x422123 in fuzzer::Fuzzer::CrashCallback() (/go/src/github.com/fuzzitdev/example-go/parser-fuzz.libfuzzer+0x422123)
  32. # #3 0x7f0ba60ff72f (/lib/x86_64-linux-gnu/libpthread.so.0+0x1272f)
  33. # #4 0x4acc70 in runtime.raise /tmp/go-fuzz-build316206684/goroot/src/runtime/sys_linux_amd64.s:149
  34. #
  35. #NOTE: libFuzzer has rudimentary signal handlers.
  36. # Combine libFuzzer with AddressSanitizer or similar for better crash reports.
  37. #SUMMARY: libFuzzer: deadly signal
  38. #MS: 1 ChangeByte-; base unit: 89b92cdd9bcb9b861c47c0179eff7b3a9baafcde
  39. #0x46,0x55,0x5a,0x5a,0x49,
  40. #FUZZI
  41. #artifact_prefix='./'; Test unit written to ./crash-df779ced6b712c5fca247e465de2de474d1d23b9
  42. #Base64: RlVaWkk=
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement