From c7e4c0d697c8fad5bf438b8b69eb419c56388667 Mon Sep 17 00:00:00 2001 From: Maria Guseva Date: Thu, 1 Jun 2017 14:34:57 +0300 Subject: [PATCH] Add TODO comments to remove the libsancov_cb hack --- packaging/libFuzzer.spec | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packaging/libFuzzer.spec b/packaging/libFuzzer.spec index 8e8b707..9e370ff 100644 --- a/packaging/libFuzzer.spec +++ b/packaging/libFuzzer.spec @@ -18,6 +18,8 @@ LibFuzzer is in-process, coverage-guided, evolutionary fuzzing engine. %build cd lib/Fuzzer CXX=gcc ./build.sh +# Build a dummy lib for sancov usage +# TODO: remove the libsancov_cb hack once __sanitizer_cov_trace_pc stub is available in GCC cd - gcc -c sancov_cb.c -o sancov_cb.o ar rcs libsancov_cb.a sancov_cb.o @@ -25,6 +27,7 @@ ar rcs libsancov_cb.a sancov_cb.o %install mkdir -p %{buildroot}%{_libdir} cp lib/Fuzzer/libFuzzer.a %{buildroot}%{_libdir} +# TODO: remove the libsancov_cb hack once __sanitizer_cov_trace_pc stub is available in GCC cp libsancov_cb.a %{buildroot}%{_libdir} mkdir -p %{buildroot}%{_prefix}/bin cp %{SOURCE1} %{SOURCE2} %{buildroot}%{_prefix}/bin @@ -46,6 +49,7 @@ Scripts for ASan and SanCov instrumentation needed for fuzzing. %post -n fuzz-force-options # Change mode to allow all users to run gcc-force/unforce-options chmod a+w /usr/bin +# TODO: remove the libsancov_cb hack once __sanitizer_cov_trace_pc stub is available in GCC /usr/bin/gcc-force-options -fsanitize-coverage=trace-pc -fsanitize=address -fno-common -fno-omit-frame-pointer -U_FORTIFY_SOURCE -lsancov_cb chmod a-w /usr/bin @@ -57,4 +61,5 @@ chmod a-w /usr/bin %files -n fuzz-force-options %{_prefix}/bin/gcc-force-options %{_prefix}/bin/gcc-unforce-options +# TODO: remove the libsancov_cb hack once __sanitizer_cov_trace_pc stub is available in GCC %{_libdir}/libsancov_cb.a -- 2.7.4