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

Apple assert fix #121

Merged
merged 2 commits into from
Aug 10, 2022
Merged

Apple assert fix #121

merged 2 commits into from
Aug 10, 2022

Conversation

graebm
Copy link
Contributor

@graebm graebm commented Aug 10, 2022

ISSUE 1: Debug builds on Apple were hitting asserts due to an aws_byte_buf where capacity wasn't set. Fixed by using aws_byte_buf_from_array(), instead of setting struct members directly.

ISSUE 2: Tests on 0-length input didn't actually DO anything. This was due to complicated loops in the tests. Fixed by making the loops even more complicated.

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

graebm added 2 commits August 10, 2022 13:53
aws_byte_buf was asserting on Apple platforms due to capacity not being set. Fixed by using aws_byte_buf_from_array() function, instead of setting struct members directly.

Also changed similar (but bug-free) Windows code to use aws_byte_buf_from_array(), for consistency
Previously, we accidentally skipped testing due to complex loops. Fixed by making the loops even more complex.
@graebm graebm merged commit 1458c70 into main Aug 10, 2022
@graebm graebm deleted the apple-assert-fix branch August 10, 2022 21:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants