[rabbitmq-c] initial integration (#9627)

`rabbitmq-c`  aka `librabbitmq`.

@alanxz thoughts.

Signed-off-by: Arjun Singh <ajsinghyadav00@gmail.com>

---------

Signed-off-by: Arjun Singh <ajsinghyadav00@gmail.com>
This commit is contained in:
Arjun 2023-02-20 04:17:27 +05:30 committed by GitHub
parent 335d853351
commit 3300c0fe33
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 68 additions and 0 deletions

View File

@ -0,0 +1,20 @@
# Copyright 2023 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.
#
################################################################################
FROM gcr.io/oss-fuzz-base/base-builder
RUN apt-get update && apt-get install -y cmake
RUN git clone https://github.com/alanxz/rabbitmq-c librabbitmq/
COPY build.sh $SRC/
WORKDIR $SRC/librabbitmq/

View File

@ -0,0 +1,36 @@
#!/bin/bash -eu
# Copyright 2023 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.
#
################################################################################
mkdir build
pushd build/
cmake \
-DCMAKE_BUILD_TYPE=Debug -DBUILD_OSSFUZZ=ON \
-DCMAKE_C_COMPILER="$CC" -DCMAKE_CXX_COMPILER="$CXX" \
-DCMAKE_C_FLAGS="$CFLAGS" -DCMAKE_EXE_LINKER_FLAGS="$CFLAGS" \
-DLIB_FUZZING_ENGINE="$LIB_FUZZING_ENGINE" ../.
make -j$(nproc)
cp fuzz/fuzz_url $OUT/fuzz_url
cp fuzz/fuzz_table $OUT/fuzz_table
cp fuzz/fuzz_server $OUT/fuzz_server
popd
zip -j ${OUT}/fuzz_url_seed_corpus.zip fuzz/input/fuzz_url.raw
zip -j ${OUT}/fuzz_table_seed_corpus.zip fuzz/input/fuzz_table.raw
zip -j ${OUT}/fuzz_server_seed_corpus.zip fuzz/input/fuzz_server.raw

View File

@ -0,0 +1,12 @@
homepage: "https://github.com/alanxz/rabbitmq-c"
language: c
primary_contact: "alan.antonuk@gmail.com"
auto_ccs:
- "ajsinghyadav00@gmail.com"
fuzzing_engines:
- libfuzzer
- afl
- honggfuzz
sanitizers:
- address
main_repo: 'https://github.com/alanxz/rabbitmq-c'