Closed atlesn closed 8 months ago
Attention: Patch coverage is 88.23529%
with 2 lines
in your changes are missing coverage. Please review.
Project coverage is 74.19%. Comparing base (
bee6c36
) to head (e99dde7
).
Files | Patch % | Lines |
---|---|---|
src/uv_encoding.c | 75.00% | 0 Missing and 1 partial :warning: |
src/uv_tcp_connect.c | 85.71% | 0 Missing and 1 partial :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
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.
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 calloc
.
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?
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.