From 32173c5c3c8803ba3132452d9512437a76d857e6 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Thu, 17 Mar 2016 14:12:45 -0700 Subject: First version of json fuzzer --- templates/Makefile.template | 5 ++- templates/tools/dockerfile/test/fuzzers.template | 50 ++++++++++++++++++++++++ templates/vsprojects/buildtests_c.sln.template | 2 +- templates/vsprojects/grpc.sln.template | 2 +- templates/vsprojects/vcxproj.template | 2 + 5 files changed, 58 insertions(+), 3 deletions(-) create mode 100644 templates/tools/dockerfile/test/fuzzers.template (limited to 'templates') diff --git a/templates/Makefile.template b/templates/Makefile.template index c54c146620..57fc146131 100644 --- a/templates/Makefile.template +++ b/templates/Makefile.template @@ -1737,7 +1737,7 @@ $(LIBDIR)/$(CONFIG)/lib${dep}.a\ % endfor - % if tgt.language == "c++" or tgt.boringssl: + % if tgt.language == "c++" or tgt.boringssl or tgt.build == 'fuzzer': ## C++ targets specificies. % if tgt.build == 'protoc': $(E) "[HOSTLD] Linking $@" @@ -1790,6 +1790,9 @@ $(GTEST_LIB)\ % elif tgt.language == 'c++' and tgt.build == 'benchmark': $(GTEST_LIB)\ + % endif + % if tgt.build == 'fuzzer': + -lFuzzer\ % endif -o $(BINDIR)/$(CONFIG)/${tgt.name} % if tgt.build == 'protoc' or tgt.language == 'c++': diff --git a/templates/tools/dockerfile/test/fuzzers.template b/templates/tools/dockerfile/test/fuzzers.template new file mode 100644 index 0000000000..d9e3806191 --- /dev/null +++ b/templates/tools/dockerfile/test/fuzzers.template @@ -0,0 +1,50 @@ +%YAML 1.2 +--- +foreach: targets +output_name: ${selected.name}/Dockerfile +cond: selected.build == 'fuzzer' +template: | + # Copyright 2015-2016, Google Inc. + # All rights reserved. + # + # Redistribution and use in source and binary forms, with or without + # modification, are permitted provided that the following conditions are + # met: + # + # * Redistributions of source code must retain the above copyright + # notice, this list of conditions and the following disclaimer. + # * Redistributions in binary form must reproduce the above + # copyright notice, this list of conditions and the following disclaimer + # in the documentation and/or other materials provided with the + # distribution. + # * Neither the name of Google Inc. nor the names of its + # contributors may be used to endorse or promote products derived from + # this software without specific prior written permission. + # + # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + FROM debian:jessie + + <%include file="../apt_get_basic.include"/> + <%include file="../cxx_deps.include"/> + RUN git clone -n -b master http://llvm.org/git/llvm.git && ${'\\'} + cd llvm && ${'\\'} + git checkout 308857f && ${'\\'} + cd .. + RUN clang++ -c -g -O2 -std=c++11 llvm/lib/Fuzzer/*.cpp -IFuzzer + RUN ar ruv libFuzzer.a Fuzzer*.o + RUN mv libFuzzer.a /usr/lib + RUN rm -f Fuzzer*.o + RUN mkdir /var/local/jenkins + # Define the default command. + CMD ["bash"] diff --git a/templates/vsprojects/buildtests_c.sln.template b/templates/vsprojects/buildtests_c.sln.template index a985fea64d..21312ab79a 100644 --- a/templates/vsprojects/buildtests_c.sln.template +++ b/templates/vsprojects/buildtests_c.sln.template @@ -2,6 +2,6 @@ --- | <%namespace file="sln_defs.include" import="gen_solution"/>\ <% - solution_projects = [p for p in vsprojects if p.build != 'protoc' and p.language == 'c' and not p.boringssl and not p.zlib] + solution_projects = [p for p in vsprojects if p.build not in ['protoc', 'fuzzer'] and p.language == 'c' and not p.boringssl and not p.zlib] %>\ ${gen_solution(solution_projects, use_dlls='yes')} diff --git a/templates/vsprojects/grpc.sln.template b/templates/vsprojects/grpc.sln.template index dbbb2c2ad1..ded98383da 100644 --- a/templates/vsprojects/grpc.sln.template +++ b/templates/vsprojects/grpc.sln.template @@ -2,6 +2,6 @@ --- | <%namespace file="sln_defs.include" import="gen_solution"/>\ <% - solution_projects = [p for p in vsprojects if p.build not in ['protoc', 'test'] and p.language in ['c', 'c++'] and p.vs_proj_dir == '.' and not (p.build == 'private' and p.language == 'c++')] + solution_projects = [p for p in vsprojects if p.build not in ['protoc', 'test', 'fuzzer'] and p.language in ['c', 'c++'] and p.vs_proj_dir == '.' and not (p.build == 'private' and p.language == 'c++')] %>\ ${gen_solution(solution_projects, use_dlls='yes')} diff --git a/templates/vsprojects/vcxproj.template b/templates/vsprojects/vcxproj.template index ecf113b4a8..0bb208f443 100644 --- a/templates/vsprojects/vcxproj.template +++ b/templates/vsprojects/vcxproj.template @@ -2,12 +2,14 @@ --- foreach: vsprojects output_name: ${selected.vs_proj_dir}/${selected.name}/${selected.name}.vcxproj +cond: selected.build not in ['fuzzer'] template: | <%namespace file="vcxproj_defs.include" import="gen_project"/>\ ${gen_project(selected.name, vsprojects)} --- foreach: vsprojects output_name: ${selected.vs_proj_dir}/${selected.name}/${selected.name}.vcxproj.filters +cond: selected.build not in ['fuzzer'] template: | <%namespace file="vcxproj.filters_defs.include" import="gen_filters"/>\ ${gen_filters(selected.name, vsprojects)} -- cgit v1.2.3 From 9812c6f69d0b5f5b266a10932370b11ec62e1296 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Thu, 17 Mar 2016 14:46:18 -0700 Subject: adddeps --- templates/tools/dockerfile/test/fuzzers.template | 1 + tools/dockerfile/test/fuzzers/json_fuzzer_test/Dockerfile | 15 +++++++++++++++ tools/fuzzer/build_and_run_fuzzer.sh | 1 - 3 files changed, 16 insertions(+), 1 deletion(-) (limited to 'templates') diff --git a/templates/tools/dockerfile/test/fuzzers.template b/templates/tools/dockerfile/test/fuzzers.template index d9e3806191..d4e3d64411 100644 --- a/templates/tools/dockerfile/test/fuzzers.template +++ b/templates/tools/dockerfile/test/fuzzers.template @@ -37,6 +37,7 @@ template: | <%include file="../apt_get_basic.include"/> <%include file="../cxx_deps.include"/> + <%include file="../run_tests_addons.include"/> RUN git clone -n -b master http://llvm.org/git/llvm.git && ${'\\'} cd llvm && ${'\\'} git checkout 308857f && ${'\\'} diff --git a/tools/dockerfile/test/fuzzers/json_fuzzer_test/Dockerfile b/tools/dockerfile/test/fuzzers/json_fuzzer_test/Dockerfile index b84d51136e..beae39c596 100644 --- a/tools/dockerfile/test/fuzzers/json_fuzzer_test/Dockerfile +++ b/tools/dockerfile/test/fuzzers/json_fuzzer_test/Dockerfile @@ -67,6 +67,21 @@ RUN apt-get update && apt-get install -y time && apt-get clean # C++ dependencies RUN apt-get update && apt-get -y install libgflags-dev libgtest-dev libc++-dev clang && apt-get clean +# Prepare ccache +RUN ln -s /usr/bin/ccache /usr/local/bin/gcc +RUN ln -s /usr/bin/ccache /usr/local/bin/g++ +RUN ln -s /usr/bin/ccache /usr/local/bin/cc +RUN ln -s /usr/bin/ccache /usr/local/bin/c++ +RUN ln -s /usr/bin/ccache /usr/local/bin/clang +RUN ln -s /usr/bin/ccache /usr/local/bin/clang++ + +#====================== +# Zookeeper dependencies +# TODO(jtattermusch): is zookeeper still needed? +RUN apt-get install -y libzookeeper-mt-dev + +RUN mkdir /var/local/jenkins + RUN git clone -n -b master http://llvm.org/git/llvm.git && \ cd llvm && \ git checkout 308857f && \ diff --git a/tools/fuzzer/build_and_run_fuzzer.sh b/tools/fuzzer/build_and_run_fuzzer.sh index 67e3a5b99f..ace79523ea 100755 --- a/tools/fuzzer/build_and_run_fuzzer.sh +++ b/tools/fuzzer/build_and_run_fuzzer.sh @@ -32,6 +32,5 @@ set -ex git submodule update --init -make run_dep_checks make CONFIG=$config $1 bins/$config/$1 -- cgit v1.2.3 From eb784f359d8dd5a85b8d9fd67f0350bef7004fc1 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Thu, 17 Mar 2016 14:50:49 -0700 Subject: stuff --- templates/tools/dockerfile/test/fuzzers.template | 1 - tools/dockerfile/test/fuzzers/json_fuzzer_test/Dockerfile | 1 - tools/fuzzer/build_and_run_fuzzer.sh | 2 +- 3 files changed, 1 insertion(+), 3 deletions(-) (limited to 'templates') diff --git a/templates/tools/dockerfile/test/fuzzers.template b/templates/tools/dockerfile/test/fuzzers.template index d4e3d64411..763a6169ea 100644 --- a/templates/tools/dockerfile/test/fuzzers.template +++ b/templates/tools/dockerfile/test/fuzzers.template @@ -46,6 +46,5 @@ template: | RUN ar ruv libFuzzer.a Fuzzer*.o RUN mv libFuzzer.a /usr/lib RUN rm -f Fuzzer*.o - RUN mkdir /var/local/jenkins # Define the default command. CMD ["bash"] diff --git a/tools/dockerfile/test/fuzzers/json_fuzzer_test/Dockerfile b/tools/dockerfile/test/fuzzers/json_fuzzer_test/Dockerfile index beae39c596..1c95555df7 100644 --- a/tools/dockerfile/test/fuzzers/json_fuzzer_test/Dockerfile +++ b/tools/dockerfile/test/fuzzers/json_fuzzer_test/Dockerfile @@ -90,6 +90,5 @@ RUN clang++ -c -g -O2 -std=c++11 llvm/lib/Fuzzer/*.cpp -IFuzzer RUN ar ruv libFuzzer.a Fuzzer*.o RUN mv libFuzzer.a /usr/lib RUN rm -f Fuzzer*.o -RUN mkdir /var/local/jenkins # Define the default command. CMD ["bash"] diff --git a/tools/fuzzer/build_and_run_fuzzer.sh b/tools/fuzzer/build_and_run_fuzzer.sh index ace79523ea..b335859ecc 100755 --- a/tools/fuzzer/build_and_run_fuzzer.sh +++ b/tools/fuzzer/build_and_run_fuzzer.sh @@ -32,5 +32,5 @@ set -ex git submodule update --init -make CONFIG=$config $1 +make CONFIG=$config $1 -j3 bins/$config/$1 -- cgit v1.2.3 From a4134159ab7a6084ff7692d6dfb744428c0df958 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Thu, 17 Mar 2016 16:02:51 -0700 Subject: j --- templates/tools/dockerfile/clang_update.include | 2 +- templates/tools/dockerfile/test/fuzzers.template | 5 +-- tools/dockerfile/test/cxx_jessie_x64/Dockerfile | 2 +- .../test/fuzzers/json_fuzzer_test/Dockerfile | 37 +++++++++++++++++++--- 4 files changed, 36 insertions(+), 10 deletions(-) (limited to 'templates') diff --git a/templates/tools/dockerfile/clang_update.include b/templates/tools/dockerfile/clang_update.include index 83ab3e0bbb..a44fe717d8 100644 --- a/templates/tools/dockerfile/clang_update.include +++ b/templates/tools/dockerfile/clang_update.include @@ -29,4 +29,4 @@ RUN cd llvm-build && cmake ${'\\'} -DCMAKE_INSTALL_PREFIX:STRING=/usr ${'\\'} -DLLVM_TARGETS_TO_BUILD:STRING=X86 ${'\\'} ../llvm -RUN make -C llvm-build && make -C llvm-build install && rm -rf llvm-build +RUN make -C llvm-build -j 12 && make -C llvm-build install && rm -rf llvm-build diff --git a/templates/tools/dockerfile/test/fuzzers.template b/templates/tools/dockerfile/test/fuzzers.template index 763a6169ea..6cf8694f3b 100644 --- a/templates/tools/dockerfile/test/fuzzers.template +++ b/templates/tools/dockerfile/test/fuzzers.template @@ -37,11 +37,8 @@ template: | <%include file="../apt_get_basic.include"/> <%include file="../cxx_deps.include"/> + <%include file="../clang_update.include"/> <%include file="../run_tests_addons.include"/> - RUN git clone -n -b master http://llvm.org/git/llvm.git && ${'\\'} - cd llvm && ${'\\'} - git checkout 308857f && ${'\\'} - cd .. RUN clang++ -c -g -O2 -std=c++11 llvm/lib/Fuzzer/*.cpp -IFuzzer RUN ar ruv libFuzzer.a Fuzzer*.o RUN mv libFuzzer.a /usr/lib diff --git a/tools/dockerfile/test/cxx_jessie_x64/Dockerfile b/tools/dockerfile/test/cxx_jessie_x64/Dockerfile index b848f233b7..685d2038b0 100644 --- a/tools/dockerfile/test/cxx_jessie_x64/Dockerfile +++ b/tools/dockerfile/test/cxx_jessie_x64/Dockerfile @@ -98,7 +98,7 @@ RUN cd llvm-build && cmake \ -DCMAKE_INSTALL_PREFIX:STRING=/usr \ -DLLVM_TARGETS_TO_BUILD:STRING=X86 \ ../llvm -RUN make -C llvm-build && make -C llvm-build install && rm -rf llvm-build +RUN make -C llvm-build -j 12 && make -C llvm-build install && rm -rf llvm-build # Prepare ccache RUN ln -s /usr/bin/ccache /usr/local/bin/gcc diff --git a/tools/dockerfile/test/fuzzers/json_fuzzer_test/Dockerfile b/tools/dockerfile/test/fuzzers/json_fuzzer_test/Dockerfile index 1c95555df7..9335a2a97c 100644 --- a/tools/dockerfile/test/fuzzers/json_fuzzer_test/Dockerfile +++ b/tools/dockerfile/test/fuzzers/json_fuzzer_test/Dockerfile @@ -67,6 +67,39 @@ RUN apt-get update && apt-get install -y time && apt-get clean # C++ dependencies RUN apt-get update && apt-get -y install libgflags-dev libgtest-dev libc++-dev clang && apt-get clean +#================= +# Update clang to a version with improved tsan + +RUN apt-get update && apt-get -y install python cmake && apt-get clean + +RUN git clone -n -b release_38 http://llvm.org/git/llvm.git && \ + cd llvm && git checkout ad57503 && cd .. +RUN git clone -n -b release_38 http://llvm.org/git/clang.git && \ + cd clang && git checkout ad2c56e && cd .. +RUN git clone -n -b release_38 http://llvm.org/git/compiler-rt.git && \ + cd compiler-rt && git checkout 3176922 && cd .. +RUN git clone -n -b release_38 \ + http://llvm.org/git/clang-tools-extra.git && cd clang-tools-extra && \ + git checkout c288525 && cd .. +RUN git clone -n -b release_38 http://llvm.org/git/libcxx.git && \ + cd libcxx && git checkout fda3549 && cd .. +RUN git clone -n -b release_38 http://llvm.org/git/libcxxabi.git && \ + cd libcxxabi && git checkout 8d4e51d && cd .. + +RUN mv clang llvm/tools +RUN mv compiler-rt llvm/projects +RUN mv clang-tools-extra llvm/tools/clang/tools +RUN mv libcxx llvm/projects +RUN mv libcxxabi llvm/projects + +RUN mkdir llvm-build +RUN cd llvm-build && cmake \ + -DCMAKE_BUILD_TYPE:STRING=Release \ + -DCMAKE_INSTALL_PREFIX:STRING=/usr \ + -DLLVM_TARGETS_TO_BUILD:STRING=X86 \ + ../llvm +RUN make -C llvm-build -j 12 && make -C llvm-build install && rm -rf llvm-build + # Prepare ccache RUN ln -s /usr/bin/ccache /usr/local/bin/gcc RUN ln -s /usr/bin/ccache /usr/local/bin/g++ @@ -82,10 +115,6 @@ RUN apt-get install -y libzookeeper-mt-dev RUN mkdir /var/local/jenkins -RUN git clone -n -b master http://llvm.org/git/llvm.git && \ - cd llvm && \ - git checkout 308857f && \ - cd .. RUN clang++ -c -g -O2 -std=c++11 llvm/lib/Fuzzer/*.cpp -IFuzzer RUN ar ruv libFuzzer.a Fuzzer*.o RUN mv libFuzzer.a /usr/lib -- cgit v1.2.3 From c2c026e84376e8e65d7af84b9df33071c0511d1d Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 18 Mar 2016 08:28:21 -0700 Subject: Renames --- templates/tools/dockerfile/clang_update.include | 2 +- .../dockerfile/test/fuzzer/Dockerfile.template | 43 +++++++ templates/tools/dockerfile/test/fuzzers.template | 47 -------- tools/dockerfile/test/cxx_jessie_x64/Dockerfile | 2 +- tools/dockerfile/test/fuzzer/Dockerfile | 123 +++++++++++++++++++++ .../test/fuzzers/json_fuzzer_test/Dockerfile | 123 --------------------- tools/fuzzer/build_and_run_fuzzer.sh | 3 - tools/jenkins/run_fuzzer.sh | 2 +- 8 files changed, 169 insertions(+), 176 deletions(-) create mode 100644 templates/tools/dockerfile/test/fuzzer/Dockerfile.template delete mode 100644 templates/tools/dockerfile/test/fuzzers.template create mode 100644 tools/dockerfile/test/fuzzer/Dockerfile delete mode 100644 tools/dockerfile/test/fuzzers/json_fuzzer_test/Dockerfile (limited to 'templates') diff --git a/templates/tools/dockerfile/clang_update.include b/templates/tools/dockerfile/clang_update.include index a44fe717d8..4f827c8dc2 100644 --- a/templates/tools/dockerfile/clang_update.include +++ b/templates/tools/dockerfile/clang_update.include @@ -1,5 +1,5 @@ #================= -# Update clang to a version with improved tsan +# Update clang to a version with improved tsan and fuzzing capabilities RUN apt-get update && apt-get -y install python cmake && apt-get clean diff --git a/templates/tools/dockerfile/test/fuzzer/Dockerfile.template b/templates/tools/dockerfile/test/fuzzer/Dockerfile.template new file mode 100644 index 0000000000..479be0556a --- /dev/null +++ b/templates/tools/dockerfile/test/fuzzer/Dockerfile.template @@ -0,0 +1,43 @@ +%YAML 1.2 +--- | + # Copyright 2015-2016, Google Inc. + # All rights reserved. + # + # Redistribution and use in source and binary forms, with or without + # modification, are permitted provided that the following conditions are + # met: + # + # * Redistributions of source code must retain the above copyright + # notice, this list of conditions and the following disclaimer. + # * Redistributions in binary form must reproduce the above + # copyright notice, this list of conditions and the following disclaimer + # in the documentation and/or other materials provided with the + # distribution. + # * Neither the name of Google Inc. nor the names of its + # contributors may be used to endorse or promote products derived from + # this software without specific prior written permission. + # + # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + FROM debian:jessie + + <%include file="../../apt_get_basic.include"/> + <%include file="../../cxx_deps.include"/> + <%include file="../../clang_update.include"/> + <%include file="../../run_tests_addons.include"/> + RUN clang++ -c -g -O2 -std=c++11 llvm/lib/Fuzzer/*.cpp -IFuzzer + RUN ar ruv libFuzzer.a Fuzzer*.o + RUN mv libFuzzer.a /usr/lib + RUN rm -f Fuzzer*.o + # Define the default command. + CMD ["bash"] diff --git a/templates/tools/dockerfile/test/fuzzers.template b/templates/tools/dockerfile/test/fuzzers.template deleted file mode 100644 index 6cf8694f3b..0000000000 --- a/templates/tools/dockerfile/test/fuzzers.template +++ /dev/null @@ -1,47 +0,0 @@ -%YAML 1.2 ---- -foreach: targets -output_name: ${selected.name}/Dockerfile -cond: selected.build == 'fuzzer' -template: | - # Copyright 2015-2016, Google Inc. - # All rights reserved. - # - # Redistribution and use in source and binary forms, with or without - # modification, are permitted provided that the following conditions are - # met: - # - # * Redistributions of source code must retain the above copyright - # notice, this list of conditions and the following disclaimer. - # * Redistributions in binary form must reproduce the above - # copyright notice, this list of conditions and the following disclaimer - # in the documentation and/or other materials provided with the - # distribution. - # * Neither the name of Google Inc. nor the names of its - # contributors may be used to endorse or promote products derived from - # this software without specific prior written permission. - # - # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - FROM debian:jessie - - <%include file="../apt_get_basic.include"/> - <%include file="../cxx_deps.include"/> - <%include file="../clang_update.include"/> - <%include file="../run_tests_addons.include"/> - RUN clang++ -c -g -O2 -std=c++11 llvm/lib/Fuzzer/*.cpp -IFuzzer - RUN ar ruv libFuzzer.a Fuzzer*.o - RUN mv libFuzzer.a /usr/lib - RUN rm -f Fuzzer*.o - # Define the default command. - CMD ["bash"] diff --git a/tools/dockerfile/test/cxx_jessie_x64/Dockerfile b/tools/dockerfile/test/cxx_jessie_x64/Dockerfile index 685d2038b0..6c7aece4ff 100644 --- a/tools/dockerfile/test/cxx_jessie_x64/Dockerfile +++ b/tools/dockerfile/test/cxx_jessie_x64/Dockerfile @@ -68,7 +68,7 @@ RUN apt-get update && apt-get install -y time && apt-get clean RUN apt-get update && apt-get -y install libgflags-dev libgtest-dev libc++-dev clang && apt-get clean #================= -# Update clang to a version with improved tsan +# Update clang to a version with improved tsan and fuzzing capabilities RUN apt-get update && apt-get -y install python cmake && apt-get clean diff --git a/tools/dockerfile/test/fuzzer/Dockerfile b/tools/dockerfile/test/fuzzer/Dockerfile new file mode 100644 index 0000000000..7b35c009e3 --- /dev/null +++ b/tools/dockerfile/test/fuzzer/Dockerfile @@ -0,0 +1,123 @@ +# Copyright 2015-2016, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +FROM debian:jessie + +# Install Git and basic packages. +RUN apt-get update && apt-get install -y \ + autoconf \ + autotools-dev \ + build-essential \ + bzip2 \ + ccache \ + curl \ + gcc \ + gcc-multilib \ + git \ + golang \ + gyp \ + lcov \ + libc6 \ + libc6-dbg \ + libc6-dev \ + libgtest-dev \ + libtool \ + make \ + perl \ + strace \ + python-dev \ + python-setuptools \ + python-yaml \ + telnet \ + unzip \ + wget \ + zip && apt-get clean + +#================ +# Build profiling +RUN apt-get update && apt-get install -y time && apt-get clean + +#================= +# C++ dependencies +RUN apt-get update && apt-get -y install libgflags-dev libgtest-dev libc++-dev clang && apt-get clean + +#================= +# Update clang to a version with improved tsan and fuzzing capabilities + +RUN apt-get update && apt-get -y install python cmake && apt-get clean + +RUN git clone -n -b release_38 http://llvm.org/git/llvm.git && \ + cd llvm && git checkout ad57503 && cd .. +RUN git clone -n -b release_38 http://llvm.org/git/clang.git && \ + cd clang && git checkout ad2c56e && cd .. +RUN git clone -n -b release_38 http://llvm.org/git/compiler-rt.git && \ + cd compiler-rt && git checkout 3176922 && cd .. +RUN git clone -n -b release_38 \ + http://llvm.org/git/clang-tools-extra.git && cd clang-tools-extra && \ + git checkout c288525 && cd .. +RUN git clone -n -b release_38 http://llvm.org/git/libcxx.git && \ + cd libcxx && git checkout fda3549 && cd .. +RUN git clone -n -b release_38 http://llvm.org/git/libcxxabi.git && \ + cd libcxxabi && git checkout 8d4e51d && cd .. + +RUN mv clang llvm/tools +RUN mv compiler-rt llvm/projects +RUN mv clang-tools-extra llvm/tools/clang/tools +RUN mv libcxx llvm/projects +RUN mv libcxxabi llvm/projects + +RUN mkdir llvm-build +RUN cd llvm-build && cmake \ + -DCMAKE_BUILD_TYPE:STRING=Release \ + -DCMAKE_INSTALL_PREFIX:STRING=/usr \ + -DLLVM_TARGETS_TO_BUILD:STRING=X86 \ + ../llvm +RUN make -C llvm-build -j 12 && make -C llvm-build install && rm -rf llvm-build + +# Prepare ccache +RUN ln -s /usr/bin/ccache /usr/local/bin/gcc +RUN ln -s /usr/bin/ccache /usr/local/bin/g++ +RUN ln -s /usr/bin/ccache /usr/local/bin/cc +RUN ln -s /usr/bin/ccache /usr/local/bin/c++ +RUN ln -s /usr/bin/ccache /usr/local/bin/clang +RUN ln -s /usr/bin/ccache /usr/local/bin/clang++ + +#====================== +# Zookeeper dependencies +# TODO(jtattermusch): is zookeeper still needed? +RUN apt-get install -y libzookeeper-mt-dev + +RUN mkdir /var/local/jenkins + +RUN clang++ -c -g -O2 -std=c++11 llvm/lib/Fuzzer/*.cpp -IFuzzer +RUN ar ruv libFuzzer.a Fuzzer*.o +RUN mv libFuzzer.a /usr/lib +RUN rm -f Fuzzer*.o +# Define the default command. +CMD ["bash"] diff --git a/tools/dockerfile/test/fuzzers/json_fuzzer_test/Dockerfile b/tools/dockerfile/test/fuzzers/json_fuzzer_test/Dockerfile deleted file mode 100644 index 9335a2a97c..0000000000 --- a/tools/dockerfile/test/fuzzers/json_fuzzer_test/Dockerfile +++ /dev/null @@ -1,123 +0,0 @@ -# Copyright 2015-2016, Google Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -FROM debian:jessie - -# Install Git and basic packages. -RUN apt-get update && apt-get install -y \ - autoconf \ - autotools-dev \ - build-essential \ - bzip2 \ - ccache \ - curl \ - gcc \ - gcc-multilib \ - git \ - golang \ - gyp \ - lcov \ - libc6 \ - libc6-dbg \ - libc6-dev \ - libgtest-dev \ - libtool \ - make \ - perl \ - strace \ - python-dev \ - python-setuptools \ - python-yaml \ - telnet \ - unzip \ - wget \ - zip && apt-get clean - -#================ -# Build profiling -RUN apt-get update && apt-get install -y time && apt-get clean - -#================= -# C++ dependencies -RUN apt-get update && apt-get -y install libgflags-dev libgtest-dev libc++-dev clang && apt-get clean - -#================= -# Update clang to a version with improved tsan - -RUN apt-get update && apt-get -y install python cmake && apt-get clean - -RUN git clone -n -b release_38 http://llvm.org/git/llvm.git && \ - cd llvm && git checkout ad57503 && cd .. -RUN git clone -n -b release_38 http://llvm.org/git/clang.git && \ - cd clang && git checkout ad2c56e && cd .. -RUN git clone -n -b release_38 http://llvm.org/git/compiler-rt.git && \ - cd compiler-rt && git checkout 3176922 && cd .. -RUN git clone -n -b release_38 \ - http://llvm.org/git/clang-tools-extra.git && cd clang-tools-extra && \ - git checkout c288525 && cd .. -RUN git clone -n -b release_38 http://llvm.org/git/libcxx.git && \ - cd libcxx && git checkout fda3549 && cd .. -RUN git clone -n -b release_38 http://llvm.org/git/libcxxabi.git && \ - cd libcxxabi && git checkout 8d4e51d && cd .. - -RUN mv clang llvm/tools -RUN mv compiler-rt llvm/projects -RUN mv clang-tools-extra llvm/tools/clang/tools -RUN mv libcxx llvm/projects -RUN mv libcxxabi llvm/projects - -RUN mkdir llvm-build -RUN cd llvm-build && cmake \ - -DCMAKE_BUILD_TYPE:STRING=Release \ - -DCMAKE_INSTALL_PREFIX:STRING=/usr \ - -DLLVM_TARGETS_TO_BUILD:STRING=X86 \ - ../llvm -RUN make -C llvm-build -j 12 && make -C llvm-build install && rm -rf llvm-build - -# Prepare ccache -RUN ln -s /usr/bin/ccache /usr/local/bin/gcc -RUN ln -s /usr/bin/ccache /usr/local/bin/g++ -RUN ln -s /usr/bin/ccache /usr/local/bin/cc -RUN ln -s /usr/bin/ccache /usr/local/bin/c++ -RUN ln -s /usr/bin/ccache /usr/local/bin/clang -RUN ln -s /usr/bin/ccache /usr/local/bin/clang++ - -#====================== -# Zookeeper dependencies -# TODO(jtattermusch): is zookeeper still needed? -RUN apt-get install -y libzookeeper-mt-dev - -RUN mkdir /var/local/jenkins - -RUN clang++ -c -g -O2 -std=c++11 llvm/lib/Fuzzer/*.cpp -IFuzzer -RUN ar ruv libFuzzer.a Fuzzer*.o -RUN mv libFuzzer.a /usr/lib -RUN rm -f Fuzzer*.o -# Define the default command. -CMD ["bash"] diff --git a/tools/fuzzer/build_and_run_fuzzer.sh b/tools/fuzzer/build_and_run_fuzzer.sh index 6b63ef02ca..a2108988d8 100755 --- a/tools/fuzzer/build_and_run_fuzzer.sh +++ b/tools/fuzzer/build_and_run_fuzzer.sh @@ -31,8 +31,5 @@ set -ex -git submodule update --init -find . | sort -make CONFIG=$config run_dep_checks make CONFIG=$config $1 bins/$config/$1 diff --git a/tools/jenkins/run_fuzzer.sh b/tools/jenkins/run_fuzzer.sh index f2423c40ff..94ee493700 100755 --- a/tools/jenkins/run_fuzzer.sh +++ b/tools/jenkins/run_fuzzer.sh @@ -34,7 +34,7 @@ set -ex export RUN_COMMAND="tools/fuzzer/build_and_run_fuzzer.sh $1" export DOCKER_RUN_SCRIPT=tools/jenkins/docker_run.sh -export DOCKERFILE_DIR=tools/dockerfile/test/fuzzers/$1 +export DOCKERFILE_DIR=tools/dockerfile/test/fuzzer export OUTPUT_DIR= tools/jenkins/build_and_run_docker.sh \ -- cgit v1.2.3 From c6d6a024b7f70848c8ef349e003fcac7f5e0459e Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 18 Mar 2016 11:52:36 -0700 Subject: Complete fuzzer framework --- templates/tools/fuzzer/runners.template | 38 ++++++++++++++++++++++++++++++++ tools/fuzzer/build_and_run_fuzzer.sh | 4 +++- tools/fuzzer/runners/json_fuzzer_test.sh | 32 +++++++++++++++++++++++++++ 3 files changed, 73 insertions(+), 1 deletion(-) create mode 100644 templates/tools/fuzzer/runners.template create mode 100644 tools/fuzzer/runners/json_fuzzer_test.sh (limited to 'templates') diff --git a/templates/tools/fuzzer/runners.template b/templates/tools/fuzzer/runners.template new file mode 100644 index 0000000000..2070716395 --- /dev/null +++ b/templates/tools/fuzzer/runners.template @@ -0,0 +1,38 @@ +%YAML 1.2 +--- +foreach: targets +cond: selected.build == 'fuzzer' +output_name: ${selected.name}.sh +template: | + #!/bin/bash + # Copyright 2016, Google Inc. + # All rights reserved. + # + # Redistribution and use in source and binary forms, with or without + # modification, are permitted provided that the following conditions are + # met: + # + # * Redistributions of source code must retain the above copyright + # notice, this list of conditions and the following disclaimer. + # * Redistributions in binary form must reproduce the above + # copyright notice, this list of conditions and the following disclaimer + # in the documentation and/or other materials provided with the + # distribution. + # * Neither the name of Google Inc. nor the names of its + # contributors may be used to endorse or promote products derived from + # this software without specific prior written permission. + # + # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + # + + bins/$config/${selected.name} -max_total_time=60 fuzzer_output ${' '.join(selected.corpus_dirs)} diff --git a/tools/fuzzer/build_and_run_fuzzer.sh b/tools/fuzzer/build_and_run_fuzzer.sh index 48d09b4d9f..bbe68884ad 100755 --- a/tools/fuzzer/build_and_run_fuzzer.sh +++ b/tools/fuzzer/build_and_run_fuzzer.sh @@ -31,5 +31,7 @@ set -ex +cd $(dirname $0)/../.. make CONFIG=$config $1 -j3 -bins/$config/$1 -max_total_time=60 +mkdir -p fuzzer_output +. tools/fuzzer/runners/$1.sh diff --git a/tools/fuzzer/runners/json_fuzzer_test.sh b/tools/fuzzer/runners/json_fuzzer_test.sh new file mode 100644 index 0000000000..47e457232d --- /dev/null +++ b/tools/fuzzer/runners/json_fuzzer_test.sh @@ -0,0 +1,32 @@ +#!/bin/bash +# Copyright 2016, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# + +bins/$config/json_fuzzer_test -max_total_time=60 fuzzer_output test/core/json/corpus -- cgit v1.2.3 From 0b8bf0863fd220ba165b211cf1ac6051fb81b8d9 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Wed, 23 Mar 2016 20:42:38 -0700 Subject: Longer --- templates/tools/fuzzer/runners.template | 2 +- tools/fuzzer/runners/hpack_parser_fuzzer_test.sh | 2 +- tools/fuzzer/runners/http_fuzzer_test.sh | 2 +- tools/fuzzer/runners/json_fuzzer_test.sh | 2 +- tools/fuzzer/runners/uri_fuzzer_test.sh | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) (limited to 'templates') diff --git a/templates/tools/fuzzer/runners.template b/templates/tools/fuzzer/runners.template index 2070716395..99cd737676 100644 --- a/templates/tools/fuzzer/runners.template +++ b/templates/tools/fuzzer/runners.template @@ -35,4 +35,4 @@ template: | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # - bins/$config/${selected.name} -max_total_time=60 fuzzer_output ${' '.join(selected.corpus_dirs)} + bins/$config/${selected.name} -max_total_time=3600 fuzzer_output ${' '.join(selected.corpus_dirs)} diff --git a/tools/fuzzer/runners/hpack_parser_fuzzer_test.sh b/tools/fuzzer/runners/hpack_parser_fuzzer_test.sh index 932b69e8ce..d6315ec626 100644 --- a/tools/fuzzer/runners/hpack_parser_fuzzer_test.sh +++ b/tools/fuzzer/runners/hpack_parser_fuzzer_test.sh @@ -29,4 +29,4 @@ # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # -bins/$config/hpack_parser_fuzzer_test -max_total_time=60 fuzzer_output test/core/transport/chttp2/hpack_parser_corpus +bins/$config/hpack_parser_fuzzer_test -max_total_time=3600 fuzzer_output test/core/transport/chttp2/hpack_parser_corpus diff --git a/tools/fuzzer/runners/http_fuzzer_test.sh b/tools/fuzzer/runners/http_fuzzer_test.sh index afbc4f4c95..74dfe6ea23 100644 --- a/tools/fuzzer/runners/http_fuzzer_test.sh +++ b/tools/fuzzer/runners/http_fuzzer_test.sh @@ -29,4 +29,4 @@ # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # -bins/$config/http_fuzzer_test -max_total_time=60 fuzzer_output test/core/http/corpus +bins/$config/http_fuzzer_test -max_total_time=3600 fuzzer_output test/core/http/corpus diff --git a/tools/fuzzer/runners/json_fuzzer_test.sh b/tools/fuzzer/runners/json_fuzzer_test.sh index 47e457232d..2b0770a505 100644 --- a/tools/fuzzer/runners/json_fuzzer_test.sh +++ b/tools/fuzzer/runners/json_fuzzer_test.sh @@ -29,4 +29,4 @@ # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # -bins/$config/json_fuzzer_test -max_total_time=60 fuzzer_output test/core/json/corpus +bins/$config/json_fuzzer_test -max_total_time=3600 fuzzer_output test/core/json/corpus diff --git a/tools/fuzzer/runners/uri_fuzzer_test.sh b/tools/fuzzer/runners/uri_fuzzer_test.sh index 2da8d29d89..5225d18db2 100644 --- a/tools/fuzzer/runners/uri_fuzzer_test.sh +++ b/tools/fuzzer/runners/uri_fuzzer_test.sh @@ -29,4 +29,4 @@ # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # -bins/$config/uri_fuzzer_test -max_total_time=60 fuzzer_output test/core/client_config/uri_corpus +bins/$config/uri_fuzzer_test -max_total_time=3600 fuzzer_output test/core/client_config/uri_corpus -- cgit v1.2.3 From ae94594a64daacd32d0ec85746b2e7f3d02164f3 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Wed, 23 Mar 2016 21:43:58 -0700 Subject: Support tracing fuzzers --- Makefile | 10 ++++++++++ build.yaml | 13 +++++++++++++ templates/tools/fuzzer/runners.template | 8 +++++++- tools/fuzzer/runners/hpack_parser_fuzzer_test.sh | 8 +++++++- tools/fuzzer/runners/http_fuzzer_test.sh | 8 +++++++- tools/fuzzer/runners/json_fuzzer_test.sh | 8 +++++++- tools/fuzzer/runners/uri_fuzzer_test.sh | 8 +++++++- tools/run_tests/configs.json | 8 ++++++++ 8 files changed, 66 insertions(+), 5 deletions(-) (limited to 'templates') diff --git a/Makefile b/Makefile index b974126a97..b23d5f8b7e 100644 --- a/Makefile +++ b/Makefile @@ -95,6 +95,16 @@ LDXX_opt = $(DEFAULT_CXX) CPPFLAGS_opt = -O2 DEFINES_opt = NDEBUG +VALID_CONFIG_asan-trace-cmp = 1 +REQUIRE_CUSTOM_LIBRARIES_asan-trace-cmp = 1 +CC_asan-trace-cmp = clang +CXX_asan-trace-cmp = clang++ +LD_asan-trace-cmp = clang +LDXX_asan-trace-cmp = clang++ +CPPFLAGS_asan-trace-cmp = -O0 -fsanitize-coverage=trace-cmp -fsanitize=address -fno-omit-frame-pointer -Wno-unused-command-line-argument -DGPR_NO_DIRECT_SYSCALLS +LDFLAGS_asan-trace-cmp = -fsanitize=address +DEFINES_asan-trace-cmp += GRPC_TEST_SLOWDOWN_BUILD_FACTOR=3 + VALID_CONFIG_dbg = 1 CC_dbg = $(DEFAULT_CC) CXX_dbg = $(DEFAULT_CXX) diff --git a/build.yaml b/build.yaml index 76a126c947..ef2f269272 100644 --- a/build.yaml +++ b/build.yaml @@ -2846,6 +2846,19 @@ configs: test_environ: ASAN_OPTIONS: detect_leaks=0:color=always timeout_multiplier: 3 + asan-trace-cmp: + CC: clang + CPPFLAGS: -O0 -fsanitize-coverage=trace-cmp -fsanitize=address -fno-omit-frame-pointer + -Wno-unused-command-line-argument -DGPR_NO_DIRECT_SYSCALLS + CXX: clang++ + LD: clang + LDFLAGS: -fsanitize=address + LDXX: clang++ + compile_the_world: true + test_environ: + ASAN_OPTIONS: detect_leaks=1:color=always + LSAN_OPTIONS: suppressions=tools/lsan_suppressions.txt:report_objects=1 + timeout_multiplier: 3 basicprof: CPPFLAGS: -O2 -DGRPC_BASIC_PROFILER -DGRPC_TIMERS_RDTSC DEFINES: NDEBUG diff --git a/templates/tools/fuzzer/runners.template b/templates/tools/fuzzer/runners.template index 99cd737676..26ac7c80df 100644 --- a/templates/tools/fuzzer/runners.template +++ b/templates/tools/fuzzer/runners.template @@ -35,4 +35,10 @@ template: | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # - bins/$config/${selected.name} -max_total_time=3600 fuzzer_output ${' '.join(selected.corpus_dirs)} + flags="-max_total_time=3600" + if [ "$config" == "asan-trace-cmp" ] + then + flags="-use_traces=1 $flags" + fi + + bins/$config/${selected.name} $flags fuzzer_output ${' '.join(selected.corpus_dirs)} diff --git a/tools/fuzzer/runners/hpack_parser_fuzzer_test.sh b/tools/fuzzer/runners/hpack_parser_fuzzer_test.sh index d6315ec626..366fe76ab3 100644 --- a/tools/fuzzer/runners/hpack_parser_fuzzer_test.sh +++ b/tools/fuzzer/runners/hpack_parser_fuzzer_test.sh @@ -29,4 +29,10 @@ # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # -bins/$config/hpack_parser_fuzzer_test -max_total_time=3600 fuzzer_output test/core/transport/chttp2/hpack_parser_corpus +flags="-max_total_time=3600" +if [ "$config" == "asan-trace-cmp" ] +then + flags="-use_traces=1 $flags" +fi + +bins/$config/hpack_parser_fuzzer_test $flags fuzzer_output test/core/transport/chttp2/hpack_parser_corpus diff --git a/tools/fuzzer/runners/http_fuzzer_test.sh b/tools/fuzzer/runners/http_fuzzer_test.sh index 74dfe6ea23..00a420809c 100644 --- a/tools/fuzzer/runners/http_fuzzer_test.sh +++ b/tools/fuzzer/runners/http_fuzzer_test.sh @@ -29,4 +29,10 @@ # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # -bins/$config/http_fuzzer_test -max_total_time=3600 fuzzer_output test/core/http/corpus +flags="-max_total_time=3600" +if [ "$config" == "asan-trace-cmp" ] +then + flags="-use_traces=1 $flags" +fi + +bins/$config/http_fuzzer_test $flags fuzzer_output test/core/http/corpus diff --git a/tools/fuzzer/runners/json_fuzzer_test.sh b/tools/fuzzer/runners/json_fuzzer_test.sh index 2b0770a505..1cd3d55d1b 100644 --- a/tools/fuzzer/runners/json_fuzzer_test.sh +++ b/tools/fuzzer/runners/json_fuzzer_test.sh @@ -29,4 +29,10 @@ # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # -bins/$config/json_fuzzer_test -max_total_time=3600 fuzzer_output test/core/json/corpus +flags="-max_total_time=3600" +if [ "$config" == "asan-trace-cmp" ] +then + flags="-use_traces=1 $flags" +fi + +bins/$config/json_fuzzer_test $flags fuzzer_output test/core/json/corpus diff --git a/tools/fuzzer/runners/uri_fuzzer_test.sh b/tools/fuzzer/runners/uri_fuzzer_test.sh index 5225d18db2..bac4fb844d 100644 --- a/tools/fuzzer/runners/uri_fuzzer_test.sh +++ b/tools/fuzzer/runners/uri_fuzzer_test.sh @@ -29,4 +29,10 @@ # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # -bins/$config/uri_fuzzer_test -max_total_time=3600 fuzzer_output test/core/client_config/uri_corpus +flags="-max_total_time=3600" +if [ "$config" == "asan-trace-cmp" ] +then + flags="-use_traces=1 $flags" +fi + +bins/$config/uri_fuzzer_test $flags fuzzer_output test/core/client_config/uri_corpus diff --git a/tools/run_tests/configs.json b/tools/run_tests/configs.json index a858170d87..325e9aa929 100644 --- a/tools/run_tests/configs.json +++ b/tools/run_tests/configs.json @@ -2,6 +2,14 @@ { "config": "opt" }, + { + "config": "asan-trace-cmp", + "environ": { + "ASAN_OPTIONS": "detect_leaks=1:color=always", + "LSAN_OPTIONS": "suppressions=tools/lsan_suppressions.txt:report_objects=1" + }, + "timeout_multiplier": 3 + }, { "config": "dbg" }, -- cgit v1.2.3 From 66f039b160bf810c9353f1294873adc4857ad293 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Wed, 23 Mar 2016 23:38:24 -0700 Subject: Parallel experiment --- templates/tools/fuzzer/runners.template | 2 +- tools/fuzzer/runners/hpack_parser_fuzzer_test.sh | 2 +- tools/fuzzer/runners/http_fuzzer_test.sh | 2 +- tools/fuzzer/runners/json_fuzzer_test.sh | 2 +- tools/fuzzer/runners/uri_fuzzer_test.sh | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) (limited to 'templates') diff --git a/templates/tools/fuzzer/runners.template b/templates/tools/fuzzer/runners.template index 26ac7c80df..287bb2acbf 100644 --- a/templates/tools/fuzzer/runners.template +++ b/templates/tools/fuzzer/runners.template @@ -35,7 +35,7 @@ template: | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # - flags="-max_total_time=3600" + flags="-max_total_time=3600 -jobs=20 -workers=20" if [ "$config" == "asan-trace-cmp" ] then flags="-use_traces=1 $flags" diff --git a/tools/fuzzer/runners/hpack_parser_fuzzer_test.sh b/tools/fuzzer/runners/hpack_parser_fuzzer_test.sh index 366fe76ab3..6f89e5250c 100644 --- a/tools/fuzzer/runners/hpack_parser_fuzzer_test.sh +++ b/tools/fuzzer/runners/hpack_parser_fuzzer_test.sh @@ -29,7 +29,7 @@ # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # -flags="-max_total_time=3600" +flags="-max_total_time=3600 -jobs=20 -workers=20" if [ "$config" == "asan-trace-cmp" ] then flags="-use_traces=1 $flags" diff --git a/tools/fuzzer/runners/http_fuzzer_test.sh b/tools/fuzzer/runners/http_fuzzer_test.sh index 00a420809c..fb7120ddce 100644 --- a/tools/fuzzer/runners/http_fuzzer_test.sh +++ b/tools/fuzzer/runners/http_fuzzer_test.sh @@ -29,7 +29,7 @@ # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # -flags="-max_total_time=3600" +flags="-max_total_time=3600 -jobs=20 -workers=20" if [ "$config" == "asan-trace-cmp" ] then flags="-use_traces=1 $flags" diff --git a/tools/fuzzer/runners/json_fuzzer_test.sh b/tools/fuzzer/runners/json_fuzzer_test.sh index 1cd3d55d1b..fc10c77193 100644 --- a/tools/fuzzer/runners/json_fuzzer_test.sh +++ b/tools/fuzzer/runners/json_fuzzer_test.sh @@ -29,7 +29,7 @@ # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # -flags="-max_total_time=3600" +flags="-max_total_time=3600 -jobs=20 -workers=20" if [ "$config" == "asan-trace-cmp" ] then flags="-use_traces=1 $flags" diff --git a/tools/fuzzer/runners/uri_fuzzer_test.sh b/tools/fuzzer/runners/uri_fuzzer_test.sh index bac4fb844d..fb2fa69e34 100644 --- a/tools/fuzzer/runners/uri_fuzzer_test.sh +++ b/tools/fuzzer/runners/uri_fuzzer_test.sh @@ -29,7 +29,7 @@ # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # -flags="-max_total_time=3600" +flags="-max_total_time=3600 -jobs=20 -workers=20" if [ "$config" == "asan-trace-cmp" ] then flags="-use_traces=1 $flags" -- cgit v1.2.3 From b7b8d05f25974c1cf14718d23ca67192f63d41c0 Mon Sep 17 00:00:00 2001 From: Rob Earhart Date: Tue, 29 Mar 2016 11:35:29 -0700 Subject: Fix the Bazel build re/nanopb This change modifies the BUILD rule dependencies used for nanopb, switching them from third_party to //external -- the former uses submodules, which don't work well with Bazel (since Bazel removes submodules from repositories as it fetches them, preferring instead to unify submodule versions across the workspace via the top-level WORKSPACE configuration). --- BUILD | 36 +++++++++++++++--------------------- templates/BUILD.template | 28 +++++++++++++++++++++++----- 2 files changed, 38 insertions(+), 26 deletions(-) (limited to 'templates') diff --git a/BUILD b/BUILD index 52d1d5a69f..025878d82a 100644 --- a/BUILD +++ b/BUILD @@ -41,6 +41,7 @@ package(default_visibility = ["//visibility:public"]) + cc_library( name = "gpr", srcs = [ @@ -154,6 +155,7 @@ cc_library( ) + cc_library( name = "grpc", srcs = [ @@ -294,10 +296,6 @@ cc_library( "src/core/lib/tsi/ssl_types.h", "src/core/lib/tsi/transport_security.h", "src/core/lib/tsi/transport_security_interface.h", - "third_party/nanopb/pb.h", - "third_party/nanopb/pb_common.h", - "third_party/nanopb/pb_decode.h", - "third_party/nanopb/pb_encode.h", "src/core/ext/transport/chttp2/client/insecure/channel_create.c", "src/core/ext/transport/chttp2/client/secure/secure_channel_create.c", "src/core/ext/transport/chttp2/server/insecure/server_chttp2.c", @@ -459,9 +457,6 @@ cc_library( "src/core/lib/tsi/fake_transport_security.c", "src/core/lib/tsi/ssl_transport_security.c", "src/core/lib/tsi/transport_security.c", - "third_party/nanopb/pb_common.c", - "third_party/nanopb/pb_decode.c", - "third_party/nanopb/pb_encode.c", ], hdrs = [ "include/grpc/byte_buffer.h", @@ -486,6 +481,7 @@ cc_library( "//external:libssl", "//external:zlib", ":gpr", + "//external:nanopb", ], copts = [ "-std=gnu99", @@ -493,6 +489,7 @@ cc_library( ) + cc_library( name = "grpc_codegen_lib", srcs = [ @@ -529,6 +526,7 @@ cc_library( ) + cc_library( name = "grpc_unsecure", srcs = [ @@ -655,10 +653,6 @@ cc_library( "src/core/lib/transport/static_metadata.h", "src/core/lib/transport/transport.h", "src/core/lib/transport/transport_impl.h", - "third_party/nanopb/pb.h", - "third_party/nanopb/pb_common.h", - "third_party/nanopb/pb_decode.h", - "third_party/nanopb/pb_encode.h", "src/core/ext/transport/chttp2/client/insecure/channel_create.c", "src/core/ext/transport/chttp2/server/insecure/server_chttp2.c", "src/core/ext/transport/chttp2/transport/alpn.c", @@ -800,9 +794,6 @@ cc_library( "src/core/lib/transport/static_metadata.c", "src/core/lib/transport/transport.c", "src/core/lib/transport/transport_op_string.c", - "third_party/nanopb/pb_common.c", - "third_party/nanopb/pb_decode.c", - "third_party/nanopb/pb_encode.c", ], hdrs = [ "include/grpc/byte_buffer.h", @@ -824,6 +815,7 @@ cc_library( ], deps = [ ":gpr", + "//external:nanopb", ], copts = [ "-std=gnu99", @@ -831,6 +823,7 @@ cc_library( ) + cc_library( name = "grpc_zookeeper", srcs = [ @@ -851,6 +844,7 @@ cc_library( ) + cc_library( name = "grpc++", srcs = [ @@ -983,6 +977,7 @@ cc_library( ) + cc_library( name = "grpc++_codegen_lib", srcs = [ @@ -1050,6 +1045,7 @@ cc_library( ) + cc_library( name = "grpc++_unsecure", srcs = [ @@ -1174,6 +1170,7 @@ cc_library( ) + cc_library( name = "grpc_plugin_support", srcs = [ @@ -1225,6 +1222,7 @@ cc_library( ) + cc_library( name = "grpc_csharp_ext", srcs = [ @@ -1244,6 +1242,7 @@ cc_library( + objc_library( name = "gpr_objc", srcs = [ @@ -1357,6 +1356,7 @@ objc_library( ) + objc_library( name = "grpc_objc", srcs = [ @@ -1521,9 +1521,6 @@ objc_library( "src/core/lib/tsi/fake_transport_security.c", "src/core/lib/tsi/ssl_transport_security.c", "src/core/lib/tsi/transport_security.c", - "third_party/nanopb/pb_common.c", - "third_party/nanopb/pb_decode.c", - "third_party/nanopb/pb_encode.c", ], hdrs = [ "include/grpc/byte_buffer.h", @@ -1676,10 +1673,6 @@ objc_library( "src/core/lib/tsi/ssl_types.h", "src/core/lib/tsi/transport_security.h", "src/core/lib/tsi/transport_security_interface.h", - "third_party/nanopb/pb.h", - "third_party/nanopb/pb_common.h", - "third_party/nanopb/pb_decode.h", - "third_party/nanopb/pb_encode.h", ], includes = [ "include", @@ -1688,6 +1681,7 @@ objc_library( deps = [ ":gpr_objc", "//external:libssl_objc", + "//external:nanopb", ], sdk_dylibs = ["libz"], ) diff --git a/templates/BUILD.template b/templates/BUILD.template index 54dc697125..ebf7ffbf9a 100644 --- a/templates/BUILD.template +++ b/templates/BUILD.template @@ -60,7 +60,7 @@ deps.append(':%s' % (d)) return deps %> - + % for lib in libs: % if lib.build in ("all", "protoc"): ${cc_library(lib)} @@ -80,13 +80,19 @@ % endfor <%def name="cc_library(lib)"> + <% + lib_hdrs = lib.get("headers", []) + hdrs = [h for h in lib_hdrs if not h.startswith('third_party/nanopb')] + srcs = [s for s in lib.src if not s.startswith('third_party/nanopb')] + uses_nanopb = len(lib_hdrs) != len(hdrs) or len(srcs) != len(lib.src) + %> cc_library( name = "${lib.name}", srcs = [ - % for hdr in lib.get("headers", []): + % for hdr in hdrs: "${hdr}", % endfor - % for src in lib.src: + % for src in srcs: "${src}", % endfor ], @@ -103,6 +109,9 @@ % for dep in get_deps(lib): "${dep}", % endfor + % if uses_nanopb: + "//external:nanopb", + % endif ], % if lib.name in ("grpc", "grpc_unsecure"): copts = [ @@ -113,10 +122,16 @@ <%def name="objc_library(lib)"> + <% + lib_hdrs = lib.get("headers", []) + hdrs = [h for h in lib_hdrs if not h.startswith('third_party/nanopb')] + srcs = [s for s in lib.src if not s.startswith('third_party/nanopb')] + uses_nanopb = len(lib_hdrs) != len(hdrs) or len(srcs) != len(lib.src) + %> objc_library( name = "${lib.name}_objc", srcs = [ - % for src in lib.src: + % for src in srcs: "${src}", % endfor ], @@ -124,7 +139,7 @@ % for hdr in lib.get("public_headers", []): "${hdr}", % endfor - % for hdr in lib.get("headers", []): + % for hdr in hdrs: "${hdr}", % endfor ], @@ -138,6 +153,9 @@ % endfor % if lib.get('secure', False): "//external:libssl_objc", + % endif + % if uses_nanopb: + "//external:nanopb", % endif ], % if lib.get("baselib", false): -- cgit v1.2.3 From ff20c2b46cbe967f73ba02caa87bcdb57417229c Mon Sep 17 00:00:00 2001 From: Rob Earhart Date: Tue, 29 Mar 2016 11:39:04 -0700 Subject: Add protobuf_clib to deps of grpc++_codegen_lib This is required in order to compile grpc++_codegen_lib. --- BUILD | 1 + templates/BUILD.template | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'templates') diff --git a/BUILD b/BUILD index 025878d82a..fc4dfe8d9a 100644 --- a/BUILD +++ b/BUILD @@ -1041,6 +1041,7 @@ cc_library( ".", ], deps = [ + "//external:protobuf_clib", ], ) diff --git a/templates/BUILD.template b/templates/BUILD.template index ebf7ffbf9a..23a656c360 100644 --- a/templates/BUILD.template +++ b/templates/BUILD.template @@ -49,7 +49,9 @@ ] if target_dict.get('build', None) == 'protoc': deps.append("//external:protobuf_compiler") - if target_dict['name'] == 'grpc++_unsecure' or target_dict['name'] == 'grpc++': + if (target_dict['name'] == 'grpc++_unsecure' or + target_dict['name'] == 'grpc++' or + target_dict['name'] == 'grpc++_codegen_lib'): deps.append("//external:protobuf_clib") elif target_dict['name'] == 'grpc': deps.append("//external:zlib") -- cgit v1.2.3 From 67af237be2c49fae82a183648c3208a1185553ba Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Tue, 29 Mar 2016 15:34:05 -0700 Subject: Trim number of CPUs --- templates/tools/fuzzer/runners.template | 2 +- tools/fuzzer/runners/hpack_parser_fuzzer_test.sh | 2 +- tools/fuzzer/runners/http_fuzzer_test.sh | 2 +- tools/fuzzer/runners/json_fuzzer_test.sh | 2 +- tools/fuzzer/runners/uri_fuzzer_test.sh | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) (limited to 'templates') diff --git a/templates/tools/fuzzer/runners.template b/templates/tools/fuzzer/runners.template index 287bb2acbf..aa81a6545d 100644 --- a/templates/tools/fuzzer/runners.template +++ b/templates/tools/fuzzer/runners.template @@ -35,7 +35,7 @@ template: | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # - flags="-max_total_time=3600 -jobs=20 -workers=20" + flags="-max_total_time=3600 -jobs=3 -workers=3" if [ "$config" == "asan-trace-cmp" ] then flags="-use_traces=1 $flags" diff --git a/tools/fuzzer/runners/hpack_parser_fuzzer_test.sh b/tools/fuzzer/runners/hpack_parser_fuzzer_test.sh index 6f89e5250c..a91cf6d458 100644 --- a/tools/fuzzer/runners/hpack_parser_fuzzer_test.sh +++ b/tools/fuzzer/runners/hpack_parser_fuzzer_test.sh @@ -29,7 +29,7 @@ # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # -flags="-max_total_time=3600 -jobs=20 -workers=20" +flags="-max_total_time=3600 -jobs=3 -workers=3" if [ "$config" == "asan-trace-cmp" ] then flags="-use_traces=1 $flags" diff --git a/tools/fuzzer/runners/http_fuzzer_test.sh b/tools/fuzzer/runners/http_fuzzer_test.sh index fb7120ddce..47adad0cb7 100644 --- a/tools/fuzzer/runners/http_fuzzer_test.sh +++ b/tools/fuzzer/runners/http_fuzzer_test.sh @@ -29,7 +29,7 @@ # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # -flags="-max_total_time=3600 -jobs=20 -workers=20" +flags="-max_total_time=3600 -jobs=3 -workers=3" if [ "$config" == "asan-trace-cmp" ] then flags="-use_traces=1 $flags" diff --git a/tools/fuzzer/runners/json_fuzzer_test.sh b/tools/fuzzer/runners/json_fuzzer_test.sh index fc10c77193..9c5cba3baf 100644 --- a/tools/fuzzer/runners/json_fuzzer_test.sh +++ b/tools/fuzzer/runners/json_fuzzer_test.sh @@ -29,7 +29,7 @@ # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # -flags="-max_total_time=3600 -jobs=20 -workers=20" +flags="-max_total_time=3600 -jobs=3 -workers=3" if [ "$config" == "asan-trace-cmp" ] then flags="-use_traces=1 $flags" diff --git a/tools/fuzzer/runners/uri_fuzzer_test.sh b/tools/fuzzer/runners/uri_fuzzer_test.sh index fb2fa69e34..58f20d021c 100644 --- a/tools/fuzzer/runners/uri_fuzzer_test.sh +++ b/tools/fuzzer/runners/uri_fuzzer_test.sh @@ -29,7 +29,7 @@ # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # -flags="-max_total_time=3600 -jobs=20 -workers=20" +flags="-max_total_time=3600 -jobs=3 -workers=3" if [ "$config" == "asan-trace-cmp" ] then flags="-use_traces=1 $flags" -- cgit v1.2.3