duckdb: migrate to upstream build (#6765)

This commit is contained in:
DavidKorczynski 2021-11-04 11:51:44 +00:00 committed by GitHub
parent 114a467130
commit 110524fa1e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 2 additions and 26 deletions

View File

@ -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

View File

@ -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}

View File

@ -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<const char*>(data), size);
duckdb::Parser parser;
try {
parser.ParseQuery(input);
} catch (std::exception &e) {}
return 0;
}