From 110524fa1e8d3e599db9aaea4d4b3351f669715d Mon Sep 17 00:00:00 2001 From: DavidKorczynski Date: Thu, 4 Nov 2021 11:51:44 +0000 Subject: [PATCH] duckdb: migrate to upstream build (#6765) --- projects/duckdb/Dockerfile | 3 +-- projects/duckdb/build.sh | 2 +- projects/duckdb/parse_fuzz_test.cpp | 23 ----------------------- 3 files changed, 2 insertions(+), 26 deletions(-) delete mode 100644 projects/duckdb/parse_fuzz_test.cpp diff --git a/projects/duckdb/Dockerfile b/projects/duckdb/Dockerfile index b084a7404..4b35176c6 100644 --- a/projects/duckdb/Dockerfile +++ b/projects/duckdb/Dockerfile @@ -15,7 +15,6 @@ ################################################################################ FROM gcr.io/oss-fuzz-base/base-builder -RUN git clone https://github.com/duckdb/duckdb duckdb +RUN git clone --depth=1 https://github.com/duckdb/duckdb duckdb WORKDIR duckdb COPY build.sh $SRC/ -COPY parse_fuzz_test.cpp $SRC/duckdb/parse_fuzz_test.cpp diff --git a/projects/duckdb/build.sh b/projects/duckdb/build.sh index 7d49ebad7..4f2579008 100755 --- a/projects/duckdb/build.sh +++ b/projects/duckdb/build.sh @@ -17,7 +17,7 @@ make THIRD_PARTY_LIBS=$(find ./build/release/third_party/ -name "*.a") -$CXX $CXXFLAGS $LIB_FUZZING_ENGINE $SRC/duckdb/parse_fuzz_test.cpp \ +$CXX $CXXFLAGS $LIB_FUZZING_ENGINE ./test/ossfuzz/parse_fuzz_test.cpp \ -o $OUT/parse_fuzz_test -I./ -I./src/include \ ./build/release/src/libduckdb_static.a \ ${THIRD_PARTY_LIBS} diff --git a/projects/duckdb/parse_fuzz_test.cpp b/projects/duckdb/parse_fuzz_test.cpp deleted file mode 100644 index fdae6bdc3..000000000 --- a/projects/duckdb/parse_fuzz_test.cpp +++ /dev/null @@ -1,23 +0,0 @@ -/* Copyright 2021 Google LLC -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ -#include "duckdb/parser/parser.hpp" - -extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) -{ - std::string input(reinterpret_cast(data), size); - duckdb::Parser parser; - try { - parser.ParseQuery(input); - } catch (std::exception &e) {} - - return 0; -}