-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
fuzz: Add libfuzzer compatible bounds fuzzer #7549
Conversation
See #4088 |
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 is great, thanks for doing this! Lgtm pending green buildbots.
test/fuzz/bounds.cpp
Outdated
@@ -96,108 +97,98 @@ Expr random_condition(Type T, int depth, bool maybe_scalar) { | |||
}; | |||
const int op_count = sizeof(make_bin_op) / sizeof(make_bin_op[0]); |
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 is unused, it must be removed
I took the liberty of harvesting fixes from #7551 and #7548 and applying them here (since our buildbot doesn't test this stuff, I pulled this into Google to test)... unfortunately it's still broken, as running it with default args ends up trying to construct a binary operation with vector elements with mismatched lanes. Gonna debug some more. Specifically:
...it seems puzzling that we would be generating random expressions that return vector-expressions with a lane count different from the input types; I wouldn't think that would ever work. |
hrm, this may have found a real bug: it seems we are generating two uint32x6:
But if we attempt to cast either to uint1x6 (ie, bool), we fail inside cast at IROperator.cpp:1946 because we don't expect the type to be a combination of Broadcast-and-Ramp. Pondering the right way to handle this. |
See #7556 for possible fix |
LGTM. There are still issues to be resolved with the fuzzers but this change seems OK. |
ready to land? |
All good on my end! |
* fuzz: Add libfuzzer compatible bounds fuzzer * Remove unused constant * Style fix * Fix handling of binary ops * Handle casting to vector-of-bool properly * fuzz: Alphabetically sort targets in CMake --------- Co-authored-by: Steven Johnson <srj@google.com>
No description provided.