-
Notifications
You must be signed in to change notification settings - Fork 7
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
[atlesn] Fix misc. usage of uninitialized memory #180
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #180 +/- ##
==========================================
+ Coverage 74.16% 74.19% +0.03%
==========================================
Files 52 52
Lines 10358 10367 +9
Branches 2465 2465
==========================================
+ Hits 7682 7692 +10
Misses 1321 1321
+ Partials 1355 1354 -1 ☔ View full report in Codecov by Sentry. |
Thanks! I left some comments. The barrier case looks fine. The other two I'm not sure, if possible I'd like to get to the bottom of this and explicitly initialize the memory without resorting to |
Changed all three callocs to explicit initialization. Also tried to follow styles used elsewhere in the project, please have a look if it feels OK. |
I found another one where padding of encoded configuration struct was not initialized. Sorry about force push, I did the end pointer calculation twice initially. But I guess the commits should be squashed probably anyway? |
Thanks! I think this is good to go as it is now. It seems to fix the problem in a good away with explicit memory initialization instead of blind calloc calls. I might tweak the code a bit after merging this, but it would be purely cosmetics/nits. |
I identified three places where uninitialized memory was used for outgoing traffic using valgrind. This seemed to be caused by misc. struct members not being set explicitly although I have not investigated this in detail. I replaced some mallocs with callocs which seemed to solve the problem.