Skip to content
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

Initialize blobs and stuffers #3783

Merged
merged 1 commit into from
Jan 27, 2023
Merged

Initialize blobs and stuffers #3783

merged 1 commit into from
Jan 27, 2023

Conversation

lrstewart
Copy link
Contributor

@lrstewart lrstewart commented Jan 27, 2023

Description of changes:

This unintialized stuffer in s2n_quic_support_io_test.c caused our tests to fail in a particular build environment that doesn't automatically initialize stack variables.

This exact problem has bitten us a several times, so I did a simple find and replace that should have caught any uninitialized s2n_blob or s2n_stuffer structures. Fixing ALL unintialized variables is a much more challenging change (with a much larger diff). This is just better than fixing only the single instance that broke the build.

Call-outs:

Automating this in grep_simple_mistakes is probably doable, but tricky. I ran into a couple false positives with my simple search due to it being difficult to distinguish between stack variables and entries in a struct definition. An automated test would need to iterate over every line and keep "are we in a struct definition" state.

Testing:

Existing tests pass. I also verified this fixes the build issue I saw.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@github-actions github-actions bot added the s2n-core team label Jan 27, 2023
@lrstewart lrstewart marked this pull request as ready for review January 27, 2023 17:27
@lrstewart lrstewart merged commit 4aec93c into aws:main Jan 27, 2023
@lrstewart lrstewart deleted the init branch January 27, 2023 19:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants