-
Notifications
You must be signed in to change notification settings - Fork 380
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
encoder: add compact fuzz tests and fix bugs related to unhandled event types #2819
Conversation
Signed-off-by: William Findlay <[email protected]>
This is needed to debug cases where the encoder fails to encode an unhandled event. Signed-off-by: William Findlay <[email protected]>
Signed-off-by: William Findlay <[email protected]>
Signed-off-by: William Findlay <[email protected]>
We have envountered issues with unhandled types slipping through the cracks in the compact encoder. Let's add a fuzz test that should help catch these cases in the future. Signed-off-by: William Findlay <[email protected]>
Signed-off-by: William Findlay <[email protected]>
✅ Deploy Preview for tetragon ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
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.
Oh wow that's nice, are we sure we want to check in the corpus in the main repo though?
Do you have an alternative suggestion? I'd like to have these cases exercised in CI even under the normal |
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.
Please for future at least put something in the commit msg body. Generally title without any details is slightly frowned on. Otherwise nice!
Description
We've been burned recently by unhandled event types in the compact encoder's code path. Introduce a new fuzz test for the compact encoder to ensure that we don't miss any in the future. A subsequent PR will introduce a new CI job that fuzzes for a little bit on every PR to try and catch any new cases that come up. For now, we use a static corpus.
The first fuzzing run found two unhandled event types:
Add an implementation for both of the above in the compact encoder.
Changelog