Comments (10)
I think for now I'd probably just leave a comment in https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=64899 saying e.g. "This timeout is valid and just takes a long time to compute. Wont fix". Then I can mark them as resolved.
If there are to many timeouts occurring so it becomes an annoyance then we can adjust the fuzzers?
from jq.
I wonder how similar projects handle these kinds of cases?
from jq.
cc @DavidKorczynski
Any suggestions?
from jq.
@DavidKorczynski 👍 does oss-fuzz have some limit on how many things it report per day etc? thinking if the timeouts might stop it from fuzzing?
from jq.
I thought it would be problematic since this can happen very easily, any large number running that test will trigger it, but maybe not.
from jq.
P.S. If I add something like this in jq_fuzz_fixed
, will I be able to see it in the "detailed report" log on the oss-fuzz page?
diff --git a/tests/jq_fuzz_fixed.cpp b/tests/jq_fuzz_fixed.cpp
index 163eef4..88106c9 100644
--- a/tests/jq_fuzz_fixed.cpp
+++ b/tests/jq_fuzz_fixed.cpp
@@ -1,4 +1,5 @@
#include <fuzzer/FuzzedDataProvider.h>
+#include <iostream>
#include <string>
#include "jq.h"
@@ -267,13 +268,15 @@ extern "C" int LLVMFuzzerTestOneInput(uint8_t *data, size_t size) {
int idx = fdp.ConsumeIntegralInRange<int>(
0, (sizeof(jq_progs) / sizeof(char *)) - 1);
+ const char *jq_prog = jq_progs[idx];
+ std::cerr << "jq_progs[" << idx << "]: " << jq_prog << std::endl;
jq_state *jq = NULL;
jq = jq_init();
if (jq != NULL) {
jq_set_attr(jq, jv_string("JQ_ORIGIN"), jv_string("/tmp/"));
- if (jq_compile(jq, jq_progs[idx])) {
+ if (jq_compile(jq, jq_prog) {
// Process to jv_parse and then jv_next
jv input = jv_parse(parse_payload1.c_str());
if (jv_is_valid(input)) {
Currently, I have just been running all the tests manually with:
jq -r '.[] | @sh "./jq -- \(.) <<< theinput # /orlessthanpathtofile"' teststhing | PS4=$ bash -x
(teststhing
is adapted from the c++ source file and contains a JSON array with all the jq_progs
.)
Until I reach the one that triggers problems, because I have not figured out an easy way to tell which program was used from just the seed.
from jq.
Until I reach the one that triggers problems, because I have not figured out an easy way to tell which program was used from just the seed.
In order to make it easy to see which program was used I'd suggest converting
Lines 8 to 29 in 2ccab04
from jq.
That would be great. I've managed to reproduce using the instructions at https://google.github.io/oss-fuzz/advanced-topics/reproducing/ (had to add explicit architecture flag in some place) but being to see query and be able to possibly reproduce without the oss-fuzz setup would be nice
from jq.
@DavidKorczynski 👍 does oss-fuzz have some limit on how many things it report per day etc? thinking if the timeouts might stop it from fuzzing?
No limit as such. If the timeouts are really easy to trigger and it becomes spammy then I think our best option is to adjust the fuzzer.
from jq.
Thank you
from jq.
Related Issues (20)
- Null bytes are handled inconsistently HOT 5
- tonumber doesn't work on `true` or `false` HOT 4
- "color for object keys" from JQ_COLORS doesn't seem to be respected HOT 4
- `range/3` behaviour when $init and $upto arguments are not numbers HOT 4
- Regular expression alternation (|) used with quantifier (* or +) returns inconsistent results when first alternative is able to match an empty string HOT 3
- Create Multi Smaller Files From a Big Json File HOT 5
- Add the Symbolic Binding Operator ("as") to the operator priority table HOT 1
- Including and importing module with importing JSON crashes jq
- The code example for trim ltrim and rtrim from the manual do not work HOT 2
- Incorrect `Invalid path expression` in destructuring expressions
- 1.7.1 dumps core on Cygwin, trying to find the input filename to print an error message HOT 5
- jq --raw modes, --binary and newlines
- Request for snap maintenance HOT 11
- strptime month does not match input HOT 2
- Using unique or unique_by in a filter causes subsequent (after comma ,) filter inputs to be replaced with its output HOT 5
- Docker images lack `latest` tag HOT 2
- modulemeta failure when module location is found by "search"
- oss-fuzz/issues/detail?id=68056
- Unexpected env builtin behaviour HOT 5
- Undefined behaviour in use of <ctype.h> functions
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jq.