The branch, master has been updated
via d031391bed0 fuzzing: Fix the oss-fuzz coverage build
from a01dfc29c1f lib: Add tevent_req_received() to
messaging_filtered_read_recv()
https://git.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit d031391bed0d3c23b602816d968417267535c746
Author: Andrew Bartlett <[email protected]>
Date: Thu Oct 22 07:34:35 2020 +1300
fuzzing: Fix the oss-fuzz coverage build
It was long thought that the issue here was that no seed corpus was
provided, but actually the issue is that to obtain coverage output
just as we already know for gcc gcov, you must provide fuzzing flags
to both the compile and link phase.
Thankfully clang as a linker does not mind the strange non-linker options
from $COVERAGE_FLAGS.
REF:
https://stackoverflow.com/questions/56112019/clang-does-not-generate-profraw-file-when-linking-manually
REF: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=19495#c48
Reviewed-by: Douglas Bagnall <[email protected]>
Signed-off-by: Andrew Bartlett <[email protected]>
Autobuild-User(master): Andrew Bartlett <[email protected]>
Autobuild-Date(master): Wed Oct 21 23:07:37 UTC 2020 on sn-devel-184
-----------------------------------------------------------------------
Summary of changes:
lib/fuzzing/oss-fuzz/build_samba.sh | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
Changeset truncated at 500 lines:
diff --git a/lib/fuzzing/oss-fuzz/build_samba.sh
b/lib/fuzzing/oss-fuzz/build_samba.sh
index b27c7b7d5c8..5980f88ad02 100755
--- a/lib/fuzzing/oss-fuzz/build_samba.sh
+++ b/lib/fuzzing/oss-fuzz/build_samba.sh
@@ -59,7 +59,14 @@ case "$SANITIZER" in
SANITIZER_ARG='--undefined-sanitizer'
;;
coverage)
- SANITIZER_ARG=''
+ # Thankfully clang operating as ld has no objection to the
+ # cc style options, so we can just set ADDITIONAL_LDFLAGS
+ # to ensure the coverage build is done, despite waf splitting
+ # the compile and link phases.
+ ADDITIONAL_LDFLAGS="$COVERAGE_FLAGS"
+ export ADDITIONAL_LDFLAGS
+
+ SANITIZER_ARG=''
;;
esac
--
Samba Shared Repository