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

Problem: zhashx_purge() seems to leak when shrinking #1675

Merged
merged 1 commit into from
Jun 1, 2017

Conversation

jimklimov
Copy link
Member

Solution: freen() the old self->items before reassigning to the newly allocated smaller one

Signed-off-by: Jim Klimov EvgenyKlimov@eaton.com

Solution: freen() the old self->items before reassigning to the newly allocated smaller one

Signed-off-by: Jim Klimov <EvgenyKlimov@eaton.com>
@jimklimov
Copy link
Member Author

jimklimov commented Jun 1, 2017

Note: review desired, since this PR is more of an educated guess in debugging our component's issues (valgrind on Travis is ok against czmq-3.0.2 but reports multiple leaks against current master) - see e.g. https://travis-ci.org/42ity/fty-metric-composite/jobs/237155542 for details.

UPDATE: Looked at 3.0.2 codebase now - it did the equivalent free(), so this is likely the cause :)

@jimklimov
Copy link
Member Author

Also posted a self-test PR separately at #1676 - hopefully it would expose the problem (and later confirm the fix) on Travis too :)

@bluca bluca merged commit 65403f8 into zeromq:master Jun 1, 2017
@bluca
Copy link
Member

bluca commented Jun 1, 2017

Yes it seems indeed the right thing to do. Thanks!

@jimklimov
Copy link
Member Author

yay, our project now passes with czmq4 and can deprecate requirement for czmq-3.0.2 :)

@bluca
Copy link
Member

bluca commented Jun 1, 2017

Nice!

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