summaryrefslogtreecommitdiff
path: root/oss-fuzz
diff options
context:
space:
mode:
authorMartijn van Beurden <mvanb1@gmail.com>2022-08-19 11:59:16 +0200
committerGitHub <noreply@github.com>2022-08-19 11:59:16 +0200
commit6d2492d346b929e32d04050cc8c24b7427a26042 (patch)
treec3406bb71bdcd9ad08aa074734903e337d17588b /oss-fuzz
parent010c60e1f9ad20b42863cfe7bed49593b4cccb1f (diff)
downloadflac-6d2492d346b929e32d04050cc8c24b7427a26042.tar.gz
Prepare oom checking in fuzzing
By merging oom checking in fuzzing in steps, it is possible to implement it without having oss-fuzz build failures
Diffstat (limited to 'oss-fuzz')
-rw-r--r--oss-fuzz/Makefile.am1
-rw-r--r--oss-fuzz/fuzzer_common.h2
2 files changed, 3 insertions, 0 deletions
diff --git a/oss-fuzz/Makefile.am b/oss-fuzz/Makefile.am
index deb3d9c5..a59a7ee0 100644
--- a/oss-fuzz/Makefile.am
+++ b/oss-fuzz/Makefile.am
@@ -21,6 +21,7 @@ AM_CXXFLAGS = -std=c++11
EXTRA_DIST = \
fuzzer_encoder.dict \
+ fuzzer_common.h \
Readme.md \
fuzzing/datasource/datasource.hpp \
fuzzing/datasource/id.hpp \
diff --git a/oss-fuzz/fuzzer_common.h b/oss-fuzz/fuzzer_common.h
new file mode 100644
index 00000000..9545f95e
--- /dev/null
+++ b/oss-fuzz/fuzzer_common.h
@@ -0,0 +1,2 @@
+extern int alloc_check_threshold, alloc_check_counter;
+int alloc_check_threshold = INT32_MAX, alloc_check_counter = 0;