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

[aflplusplus] Use COMPAT_CFLAGS and fix comments and formatting. #99

Merged
merged 3 commits into from
Mar 11, 2020

Conversation

jonathanmetzman
Copy link
Contributor

Fix comments and formatting issues in pull request #90.

Fix comments and formatting issues in pull request #90.
@jonathanmetzman
Copy link
Contributor Author

CC @andreafioraldi

@andreafioraldi
Copy link
Contributor

I added -pthread also on the base dockerfile. This is the only way that I had to get it working on my PC due to the linker error with libc++. Cannot reproduce now because I was using the PC in my office in university, tomorrow I'll revert the fix and post here the error.

@jonathanmetzman
Copy link
Contributor Author

I added -pthread also on the base dockerfile. This is the only way that I had to get it working on my PC due to the linker error with libc++. Cannot reproduce now because I was using the PC in my office in university, tomorrow I'll revert the fix and post here the error.

Don't worry about reproducing it, I was able to.
I'm not 100% sure if it is libc++ that needs it. I think what might be happening is projects need it and asan is linked against libc++ so these benchmarks compile fine without pthread when ASAN is used but fail otherwise.

I can look into this more to determine appropriate fix but I think it is better to call set_no_sanitizer_compilation_flags then to add -pthread to CXXFLAGS for two reasons:

  1. I think there are other flags that may be needed for some OSS-Fuzz projects that we cover in NO_SANITIZER_COMPAT_CFLAGS.
  2. base-builder isn't actually used when building the OSS-Fuzz-integrated benchmarks so if -pthread is needed there.

Sorry you had to deal with this. Non-sanitizer builds are a bit of a sharp edge in this project and I'll try to make it work better (probably starting with documenting this).
We started using ASAN by default in anticipation of counting crashes, but I may disable in other fuzzers until then (right now there is a clear advantage to not using ASAN).

@jonathanmetzman jonathanmetzman changed the title [NFC][aflplusplus] Fix comments and formatting. [aflplusplus] Use COMPAT_CFLAGS and fix comments and formatting. Mar 11, 2020
@jonathanmetzman jonathanmetzman merged commit 3b0452d into master Mar 11, 2020
@jonathanmetzman jonathanmetzman deleted the aflplusplus branch March 11, 2020 22:41
yifengchen-cc pushed a commit to yifengchen-cc/fuzzbench that referenced this pull request Apr 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants