Tarantool development patches archive
 help / color / mirror / Atom feed
From: sergeyb@tarantool.org
To: tarantool-patches@dev.tarantool.org, imun@tarantool.org,
	sergepetrenko@tarantool.org
Subject: [Tarantool-patches] [PATCH 4/4] test: integrate with OSS Fuzz
Date: Mon, 30 Nov 2020 23:24:52 +0300	[thread overview]
Message-ID: <bc0e165852eba01ec83b60f3e46e867a19110a5e.1606766417.git.sergeyb@tarantool.org> (raw)
In-Reply-To: <cover.1606766417.git.sergeyb@tarantool.org>

From: Sergey Bronnikov <sergeyb@tarantool.org>

To run Tarantool fuzzers on OSS Fuzz infrastructure it is needed to pass
library $LIB_FUZZING_ENGINE to linker and use external CFLAGS and CXXFLAGS.
Full description how to integrate with OSS Fuzz is in [1] and [2].

Patch to OSS Fuzz repository [2] is ready to merge.

1. https://google.github.io/oss-fuzz/getting-started/new-project-guide/
2. https://google.github.io/oss-fuzz/advanced-topics/ideal-integration/
3. https://github.com/google/oss-fuzz/pull/4723

Closes #1809
---
 test/fuzz/CMakeLists.txt | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/test/fuzz/CMakeLists.txt b/test/fuzz/CMakeLists.txt
index 142d38f67..3abedbf08 100644
--- a/test/fuzz/CMakeLists.txt
+++ b/test/fuzz/CMakeLists.txt
@@ -14,6 +14,13 @@ target_compile_options(
         $<$<BOOL:${ENABLE_UB_SANITIZER}>:
         -fsanitize=fuzzer,undefined
         >
+        $<$<NOT:$<BOOL:${OSS_FUZZ}>>:
+          -fsanitize=fuzzer
+        >
+        $<$<BOOL:${OSS_FUZZ}>:
+        ${CXX}
+        ${CXXFLAGS}
+        >
 )
 target_link_libraries(
     fuzzer_config
@@ -24,6 +31,12 @@ target_link_libraries(
         $<$<BOOL:${ENABLE_UB_SANITIZER}>:
         -fsanitize=fuzzer,undefined
         >
+        $<$<NOT:$<BOOL:${OSS_FUZZ}>>:
+          -fsanitize=fuzzer
+        >
+        $<$<BOOL:${OSS_FUZZ}>:
+        $ENV{LIB_FUZZING_ENGINE}
+        >
 )
 
 # Use PUBLIC to force 'fuzzer_config' for all dependent targets.
-- 
2.25.1

  parent reply	other threads:[~2020-11-30 20:25 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-30 20:24 [Tarantool-patches] [PATCH 0/4] Add fuzzing testing sergeyb
2020-11-30 20:24 ` [Tarantool-patches] [PATCH 1/4] test: add infrastructure for fuzzing testing and fuzzers sergeyb
2020-12-07 17:24   ` Igor Munkin
2020-12-07 19:54     ` Igor Munkin
2020-12-13 18:56     ` Sergey Bronnikov
2020-12-20 13:31       ` Igor Munkin
2020-12-24 10:18         ` Sergey Bronnikov
2020-12-24 13:22           ` Igor Munkin
2020-12-24 17:25             ` Sergey Bronnikov
2020-12-24 17:50               ` Igor Munkin
2020-12-25  7:07                 ` Sergey Bronnikov
2020-12-25  9:02                   ` Igor Munkin
2020-12-25 10:33                     ` Sergey Bronnikov
2020-11-30 20:24 ` [Tarantool-patches] [PATCH 2/4] test: add corpus to be used with fuzzers sergeyb
2020-12-07 17:34   ` Igor Munkin
2020-12-13 18:56     ` Sergey Bronnikov
2020-11-30 20:24 ` [Tarantool-patches] [PATCH 3/4] travis: build tarantool with ENABLE_FUZZER sergeyb
2020-12-07 17:38   ` Igor Munkin
2020-11-30 20:24 ` sergeyb [this message]
2020-12-07 17:42   ` [Tarantool-patches] [PATCH 4/4] test: integrate with OSS Fuzz Igor Munkin
2020-12-01 10:54 ` [Tarantool-patches] [PATCH 0/4] Add fuzzing testing Serge Petrenko
2020-12-01 14:41   ` Sergey Bronnikov
2020-12-01 14:45     ` Serge Petrenko
2020-12-07 17:49 ` Igor Munkin
2020-12-25 13:08 ` Igor Munkin
2020-12-25 14:52 ` Kirill Yukhin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bc0e165852eba01ec83b60f3e46e867a19110a5e.1606766417.git.sergeyb@tarantool.org \
    --to=sergeyb@tarantool.org \
    --cc=imun@tarantool.org \
    --cc=sergepetrenko@tarantool.org \
    --cc=tarantool-patches@dev.tarantool.org \
    --subject='Re: [Tarantool-patches] [PATCH 4/4] test: integrate with OSS Fuzz' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox