[HarfBuzz] harfbuzz: Branch 'master'

Behdad Esfahbod behdad at kemper.freedesktop.org
Thu Nov 5 23:09:44 PST 2015


 configure.ac              |    1 +
 test/Makefile.am          |    2 +-
 test/fuzzing/Makefile.am  |   44 ++++++++++++++++++++++++++++++++++++++++++++
 test/fuzzing/README       |    2 ++
 test/fuzzing/hb-fuzzer.cc |    4 ++--
 5 files changed, 50 insertions(+), 3 deletions(-)

New commits:
commit 19300183a6f0bac0d23f7a994b40a51e9c90d6e1
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Thu Nov 5 23:08:50 2015 -0800

    [fuzzing] Add build system

diff --git a/configure.ac b/configure.ac
index 7e4142b..b4af3cb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -440,6 +440,7 @@ src/hb-ucdn/Makefile
 util/Makefile
 test/Makefile
 test/api/Makefile
+test/fuzzing/Makefile
 test/shaping/Makefile
 docs/Makefile
 docs/version.xml
diff --git a/test/Makefile.am b/test/Makefile.am
index bbd8e5f..ec77822 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -1,6 +1,6 @@
 # Process this file with automake to produce Makefile.in
 
-SUBDIRS = api shaping
+SUBDIRS = api shaping fuzzing
 
 # Convenience targets:
 lib:
diff --git a/test/fuzzing/Makefile.am b/test/fuzzing/Makefile.am
new file mode 100644
index 0000000..5bd6921
--- /dev/null
+++ b/test/fuzzing/Makefile.am
@@ -0,0 +1,44 @@
+# Process this file with automake to produce Makefile.in
+
+NULL =
+EXTRA_DIST =
+CLEANFILES =
+DISTCLEANFILES =
+MAINTAINERCLEANFILES =
+
+# Convenience targets:
+lib:
+	@$(MAKE) $(AM_MAKEFLAGS) -C $(top_builddir)/src lib
+
+EXTRA_DIST += \
+	README \
+	$(NULL)
+
+noinst_PROGRAMS = \
+	hb-fuzzer \
+	$(NULL)
+check_PROGRAMS = $(noinst_PROGRAMS)
+
+AM_CPPFLAGS = \
+	-DHB_DISABLE_DEPRECATED \
+	-I$(top_srcdir)/src/ \
+	-I$(top_builddir)/src/ \
+	$(NULL)
+LDADD = \
+	$(top_builddir)/src/libharfbuzz.la \
+	$(NULL)
+
+hb_fuzzer_SOURCES = \
+	hb-fuzzer.cc \
+	$(NULL)
+hb_fuzzer_LDADD = \
+	$(LDADD) \
+	$(NULL)
+hb_fuzzer_CPPFLAGS = \
+	$(AM_CPPFLAGS) \
+	-DMAIN \
+	-DHB_MAX_NESTING_LEVEL=3 \
+	-DHB_SANITIZE_MAX_EDITS=3 \
+	$(NULL)
+
+-include $(top_srcdir)/git.mk
diff --git a/test/fuzzing/README b/test/fuzzing/README
index 2e537f6..47347db 100644
--- a/test/fuzzing/README
+++ b/test/fuzzing/README
@@ -5,6 +5,8 @@ harfbuzz/test/fuzzing/hb-fuzzer.cc with:
   - With -fsanitize-coverage=edge[,8bit-counters,trace-cmp]
   - With various defines that limit worst case exponential behavior:
     * -DHB_MAX_NESTING_LEVEL=3
+    * -DHB_SANITIZE_MAX_EDITS=3
+    * See Makefile.am for full list of flags
   - link against libFuzzer
 
 To run the fuzzer one needs to first obtain a test corpus as a directory
diff --git a/test/fuzzing/hb-fuzzer.cc b/test/fuzzing/hb-fuzzer.cc
index d0efae8..1412567 100644
--- a/test/fuzzing/hb-fuzzer.cc
+++ b/test/fuzzing/hb-fuzzer.cc
@@ -1,6 +1,6 @@
 #include <stddef.h>
-#include "src/hb.h"
-#include "src/hb-ot.h"
+#include <hb.h>
+#include <hb-ot.h>
 
 extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
   const char text[] = "ABCDEXYZ123 at _%&)*$!";


More information about the HarfBuzz mailing list