-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Add the first fuzz target for Qt #3171
Conversation
Will be added through *FLAGS when needed.
Can you please give me a hint how I could fix the afl-build in the CI? It fails because the "binary is not instrumented" and points me to docs/README. That again tells me to use AFL's compiler wrappers, but Travis uses "CC=clang" and "CXX=clang++". What am I missing? What can I do to fix this? Thanks in advance for your help, see you next year. :-) |
That usually happens when your AFL target is actually built for use with libFuzzer ( |
Happy new year! :-) Thank you for that hint. I have "-fsanitize=fuzzer" hardcoded in the fuzz target's project file. Now I added a workaround which removes that line using sed. I'll provide a better fix in Qt's sources but this will take a bit of time for the review- and merging-process, so for now, continuing with the workaround seems fine to me. Please let me know if there's anything else I should change. |
2020 resolution: Find Qt bugs! |
We will, I'm afraid. ;-) Thank you! |
Does this fuzz target actually run?
Adding |
Good call. You can see this happening on ClusterFuzz as well: https://console.cloud.google.com/storage/browser/_details/qt-logs.clusterfuzz-external.appspot.com/libFuzzer_qt_readnext/libfuzzer_asan_qt/2020-01-03/00:14:59:619094.log?project=clusterfuzz-external I wonder how this passed travis. |
You can't use absolute paths to dynamic libraries. In fact it's better not to use them at all. But if you must, then you need to use $ORIGIN.
Because /out exists on the runner and the builder but not on ClusterFuzz :-( |
/out does not exist? So where am I supposed to put the binaries instead? |
This looks like you tried running the fuzz target directly from outside the docker image. Then, of course, it cannot find the lib inside the docker image. When I start the fuzz target using Is running the fuzz target from outside the docker image expected to work? |
If it is meant to work, #3188 will do it. |
It isn't mean to work.
Sorry this should have failed. It only passed due to a bug that made |
Today, my build failed with:
Just like a number of other projects did. Running Is this something I could fix or may I hope that the next build will pass? |
Sorry I think that was a hiccup (see #3194) I caused when trying to ensure that the mistake you initially made gets caught by CI. |
They do. Thank you for fixing it. |
Oh, no they don't, see https://oss-fuzz-build-logs.storage.googleapis.com/log-cd589d68-203a-4e05-af65-efb95abe3484.txt
The file was zipped a couple of lines higher and that seems to have succeeded. Does anything go wrong when copying the file? |
@rlohning This last error is from the coverage build. The missing corpus in not seed corpus provided with the build, it's minimized corpus backup created by ClusterFuzz. I have added an auxiliary message to such failures in cfe13cb#diff-40efeb3947f1f992a35c2c73c6992689R180 |
Sorry, I don't quite get it. Is there anything I can do about that issue? |
Now, without any changes from my side, a build succeed and I get coverage statistics. This seems to answer the question above. :-) |
Awesome! Sorry for the trouble. |
All fine. Thank you for your patience. :-) |
This builds Qt and a first fuzz target for it. Qt's sources contain further fuzz targets already, but I'd like to start with one to see if and how this all works. If it does, I'll add the others one by one.
Improvements I'd like to do soon, i.e. not in this change:
In case I made any mistakes, please let me know and I'll happily fix them.
A healthy, happy new year to all of you. :-)