-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Adds thrift project #5264
Adds thrift project #5264
Conversation
@@ -0,0 +1,11 @@ | |||
homepage: "https://thrift.apache.org/" | |||
language: c++ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jonathanmetzman
Thrift has 28 languages
I do not know if there should be some settings for these projects (ecc-diff-fuzzer is another one)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How much code is there actually to fuzz in each language?
I assume the core code is written in one language and there are simply wrappers for other languages.
Maybe put the language of the one you are actually fuzzing.
If the core code is C++ why fuzz the go wrappers?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume the core code is written in one language and there are simply wrappers for other languages.
This is not the case for thrift, there are no wrappers.
Thrift compiles some schema into one of its 28 languages, and you get a RPC client/server only in this language (ie there is no C++ code run from golang), like 28 implementations of the same protocol(s)
So, there is about as much to fuzz in each language.
(There may also be the schema compiler, but it is itself rather a C++ parser around flex/bison )
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK I misunderstood.
I've filed #5278 to discuss this.
What languages are we fuzzing for now? Just go?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This draft PR has only golang indeed
How is that possible, when Go has such an sophisticated error handling concept <irony/>? |
clang-12: error: linker command failed with exit code 1 (use -v to see invocation) |
Waht does "cla/google — All necessary CLAs are signed" mean/imply? |
projects/thrift/fuzz.go
Outdated
@@ -0,0 +1,125 @@ | |||
package thriftfuzz |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ASF header missing
@@ -0,0 +1,22 @@ | |||
# Copyright 2021 Google LLC | |||
# |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@inferno-chromium could you help me with the legal side cf https://google.github.io/oss-fuzz/getting-started/new-project-guide/#copyright-headers ?
@@ -0,0 +1,38 @@ | |||
#!/bin/bash -eu | |||
# Copyright 2021 Google LLC | |||
# |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -0,0 +1,11 @@ | |||
homepage: "https://thrift.apache.org/" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ASF header missing
homepage: "https://thrift.apache.org/" | ||
language: c++ | ||
primary_contact: "[email protected]" | ||
auto_ccs : |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No idea. Who is going to look at the results on a regular basis? |
The mails listed in project.yaml get a notification when a new bug is found |
Ok, I will. |
It means I signed the Google CLA (so I can contribute to oss-fuzz) |
Oopsie. I somehow was under the impression that this is a PR for Thrift. You may ignore my ASF header comments then. |
@fishy the CI should fail with rust warnings like
Do you know if it is something that will be fixed ? |
Sorry I have no idea. I'm not familiar with the thrift rust library. |
cc @allengeorge Do you know about these rust errors (clip warnings from nightly) |
Still requires apache/thrift#2358 to be merged |
@catenacyber I didn't think we test using nightly Rust (the latest supported is 1.41). Why are we doing so? From quick googling online, the panic warnings showed up only on 1.51 onwards (and in the Rust 2021 edition!) |
Fixing the panics to not use the format macros should be trivial. I'll look at the other error, but I can't imagine it's super hard to fix. |
I tried to compile thrift, while having rust nightly, and got these errors |
@catenacyber I think I've been unclear: I appreciate that you're reporting these errors, but I'm simply asking:
I'm asking because the Thrift build does not test with nightly, so you're more likely to find unexpected errors. It may be worthwhile to pin your Rust version to 1.41 while fuzzing Thrift because that's what we regularly test and support. And to answer your second question: yes, I will fix these clippy lints. |
I started to use it because I needed some |
@jonathanmetzman can we disable coverage build for this project for now ? cf #5278 |
I don't know if we generally do that. But I can merge this. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Ok thanks |
@catenacyber does oss-fuzz support go's native fuzz support added in go 1.18? now that thrift's go library is on go 1.18+, I think it would make sense to switch the fuzz test code to the native one if possible. |
I think #7519 tracks this |
@Jens-G would you be interested in continuous fuzzing for thrift ?
This Pull Request is an initial integration with oss-fuzz with only a a fuzz target against a go server (the tutorial.thrift).
It quickly finds some timeouts.
A quick profiling shows that this timeout is due to a lack of error checking (see patch below)
I think that thrift would be especially fit for differential fuzzing to test that we always get the same answer for one request whatever the implementation of the server...
(goes down from 14 seconds to 200 ms to process one input)