Skip to content

Kafka codec: avoid memcpy-ing data in serializers when the bytes to c…#6831

Merged
mattklein123 merged 1 commit intoenvoyproxy:masterfrom
adamkotwasinski:kafka-serialization-fix
May 6, 2019
Merged

Kafka codec: avoid memcpy-ing data in serializers when the bytes to c…#6831
mattklein123 merged 1 commit intoenvoyproxy:masterfrom
adamkotwasinski:kafka-serialization-fix

Conversation

@adamkotwasinski
Copy link
Contributor

…opy are 0

Description:
As in title, avoids a situation when we invoke

memcpy(NULL, something, 0)

what causes asan to complain.
Testing on CI, because my mac build complains.

Risk Level: low (minor change to new code)
Testing: Will merge if ASAN CI is happy
Docs Changes: n/a
Release Notes: n/a
[Optional Fixes #Issue]
[Optional Deprecated:]

…opy are 0

Signed-off-by: Adam Kotwasinski <adam.kotwasinski@gmail.com>
@mattklein123
Copy link
Member

/retest

@repokitteh-read-only
Copy link

🔨 rebuilding ci/circleci: compile_time_options (failed build)

🐱

Caused by: a #6831 (comment) was created by @mattklein123.

see: more, trace.

Copy link
Member

@mattklein123 mattklein123 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, this looks good to me. My preference would be to collapse all of this common logic into a helper function which isn't duplicated, but maybe do that in a follow up so we can unbreak this build with this PR? Thanks for the quick turnaround.

@mattklein123 mattklein123 merged commit 402b51a into envoyproxy:master May 6, 2019
@adamkotwasinski adamkotwasinski deleted the kafka-serialization-fix branch May 7, 2019 00:03
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