Bypass hardlink restrictions

Running environment might prevent hardlinks (e.g. SELinux restrictions
in Android). As such fuzzer is failing to write identified crashes.

A new copyFile helper function has been introduced to bypass such
hardlink restrictions by failing over to a manual POSIX implementation.

Destination file O_EXCL attr. is ensuring that unique crashes feature
will be functionally identical since existing files are successfully detected.

Signed-off-by: Anestis Bechtsoudis <anestis@census-labs.com>
5 files changed
tree: 865c4b376311979294fb3772cd712fde5ec3d2ba
  1. android/
  2. docs/
  3. examples/
  4. interceptor/
  5. linux/
  6. mac/
  7. posix/
  8. third_party/
  9. .gitignore
  10. arch.h
  11. CHANGELOG
  12. common.h
  13. CONTRIBUTING
  14. COPYING
  15. files.c
  16. files.h
  17. fuzz.c
  18. fuzz.h
  19. honggfuzz.c
  20. log.c
  21. log.h
  22. Makefile
  23. mangle.c
  24. mangle.h
  25. README.md
  26. report.c
  27. report.h
  28. util.c
  29. util.h
README.md

honggfuzz

Description

Code

Requirements

  • Linux - BFD library (libbfd-dev) and LibUnwind (libunwind-dev/libunwind8-dev)
  • FreeBSD - gmake
  • Android - Android SDK/NDK

Other

This is NOT an official Google product.