Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix compilation errors and add fuzzers to CircleCI #9420

Closed
wants to merge 12 commits into from

Conversation

riversand963
Copy link
Contributor

@riversand963 riversand963 commented Jan 22, 2022

This PR does the following:

  • Fix compilation and linking errors when building fuzzer
  • Add the above to CircleCI
  • Update documentation

Test plan:
CI

@riversand963 riversand963 linked an issue Jan 22, 2022 that may be closed by this pull request
@riversand963 riversand963 changed the title [NO REVIEW] Fix compile fuzz [NO REVIEW] Fix build fuzzers Jan 22, 2022
@riversand963 riversand963 force-pushed the fix-compile-fuzz branch 6 times, most recently from 35915f2 to 3fa8373 Compare January 28, 2022 17:04
@riversand963 riversand963 changed the title [NO REVIEW] Fix build fuzzers Fix compilation errors and add fuzzers to CircleCI Jan 28, 2022
@facebook-github-bot
Copy link
Contributor

@riversand963 has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link
Contributor

@riversand963 has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link
Contributor

@riversand963 has updated the pull request. You must reimport the pull request before landing.

@facebook-github-bot
Copy link
Contributor

@riversand963 has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link
Contributor

@riversand963 has updated the pull request. You must reimport the pull request before landing.

@facebook-github-bot
Copy link
Contributor

@riversand963 has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

Copy link
Contributor

@jay-zhuang jay-zhuang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Comment on lines +144 to +147
git clone --single-branch --branch master --depth 1 git@github.com:google/libprotobuf-mutator.git ~/libprotobuf-mutator
cd ~/libprotobuf-mutator && mkdir build && cd build
cmake .. -GNinja -DCMAKE_C_COMPILER=clang-13 -DCMAKE_CXX_COMPILER=clang++-13 -DCMAKE_BUILD_TYPE=Release -DLIB_PROTO_MUTATOR_DOWNLOAD_PROTOBUF=ON
ninja && sudo ninja install
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ideally, we should ping libprotobuf to a fixed version instead of master (but seems they only have one master branch).
is there a pre-built package we could install?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I searched online but did not find a pre-built package for ubuntu or centos.
The commit history suggests that updates are rare, thus I guess we are fine for now.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -20,10 +20,10 @@ PROTO_IN = $(ROOT_DIR)/fuzz/proto
PROTO_OUT = $(ROOT_DIR)/fuzz/proto/gen

ifneq ($(FUZZ_ENV), ossfuzz)
CC = clang++
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wish we could have cmake support too.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am going to create a task/issue for this.

@riversand963 riversand963 deleted the fix-compile-fuzz branch February 1, 2022 18:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Build RocksDB fuzz testing
3 participants