Draft
Conversation
|
👋 Hi! I see this is a draft PR. |
Update all fuzz target binaries to call the `_test` function (with a DevNull logger) wrapped in `catch_unwind` instead of calling `_run` directly. This allows fuzz targets built with `--features=stdin_fuzz` to properly catch panics and exit with status 1, making them suitable for reproducing crashes by piping test case bytes via stdin. Also add a section in the fuzz README explaining how to use the stdin_fuzz feature, which is useful during git bisect or when working with tools that can construct and pipe byte sequences directly. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
c27ec27 to
b3a56d2
Compare
TheBlueMatt
reviewed
Feb 20, 2026
| TARGET_NAME_test(&data, lightning_fuzz::utils::test_logger::Stdout {}); | ||
| }); | ||
| if res.is_err() { | ||
| std::process::exit(1); |
Collaborator
There was a problem hiding this comment.
Can you explain why this is required? panicing in fn main() should cause the process to exit, no?
b3a56d2 to
ccbc566
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4430 +/- ##
==========================================
- Coverage 85.90% 85.86% -0.05%
==========================================
Files 156 157 +1
Lines 103965 103769 -196
Branches 103965 103769 -196
==========================================
- Hits 89316 89101 -215
- Misses 12128 12171 +43
+ Partials 2521 2497 -24
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add
stdin_fuzzfeature support to all fuzz targets, allowing test cases to be replayed via stdin when built with--features stdin_fuzz. This is documented in a new section in the fuzz README.