Skip to content

Conversation

@crepererum
Copy link
Contributor

See https://issues.apache.org/jira/browse/ARROW-1589

This only implements the fuzzer for a single input path, but since it also sets up the fuzzing infrastructure, it should be easy to add more tests (feel free to propose some of them to be included in this PR as well).

@crepererum crepererum force-pushed the ARROW-1589 branch 4 times, most recently from 9ecba95 to 1bd1c97 Compare January 30, 2018 12:45
@wesm wesm changed the title ARROW-1589: Fuzzing for certain input formats ARROW-1589: [C++] Fuzzing for certain input formats Jan 30, 2018
Copy link
Member

@wesm wesm left a comment

Choose a reason for hiding this comment

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

I'd prefer to organize this code a little bit closer to the things that are being tested, like the benchmarks and unit tests. So we could have an arrow/ipc/ipc-fuzzing-test.cc executable, etc. Otherwise this looks like a great start, thanks for setting this up

@xhochy
Copy link
Member

xhochy commented Feb 1, 2018

Trying to set this up and stumbled over the missing libLLVMFuzzer.a on OSX. Is there any better advice than building LLVM separately from source on Macs?

@crepererum
Copy link
Contributor Author

I've reworked the source file organization as @wesm suggested. Also --- as a nice side effect --- I've added a helper to add other fuzzing tests more easily in the future (similar to the way arrow defines tests executables).

Regarding libLLVMFuzzer.a (@xhochy):
I've used this suggestion some months ago, but I doesn't work anymore since libfuzzer was integrated into compiler-rt. I think you can just build compiler-rt (you should figure out where your llvm-config binary is) on it's own and use libclang_rt.fuzzer_osx.a for that purpose (clone source from here and use the guide on this page for compilation). Or you wait until the next LLVM release where this is hopefully integrated by default.

@crepererum
Copy link
Contributor Author

Does someone know why the tests are failing here?

@xhochy
Copy link
Member

xhochy commented Feb 2, 2018

@crepererum yes, new brotli version was published on conda-forge today, so no problem in your code.

@wesm
Copy link
Member

wesm commented Feb 2, 2018

I will take this for a drive locally and then merge. Thanks @crepererum!

Copy link
Member

@xhochy xhochy left a comment

Choose a reason for hiding this comment

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

+1, got this to work on Ubuntu 17.04

apt install clang-5.0 libfuzzer-5.0-dev
symlink /usr/lib/libLLVMFuzzer.a to  /usr/lib/llvm-5.0/lib/libFuzzer.a

then build in debug mode with the compiler set and it works.

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.

3 participants