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

Add Valgrind make target and CI run #1860

Merged
merged 6 commits into from
Mar 19, 2016
Merged

Add Valgrind make target and CI run #1860

merged 6 commits into from
Mar 19, 2016

Conversation

bluca
Copy link
Member

@bluca bluca commented Mar 19, 2016

This series of commits adds Valgrind make targets (via importing an autoconf-archive m4 macro file) and a CI run of Valgrind (memcheck), to look for memory leaks (Linux only).

The Linux Travis builds are bumped to the newer Ubuntu Trusty LTS infrastructure, since the version of Valgrind in the Precise builds is too old and has too many problems.

Solution: import ax_valgrind_check.m4 macro file to provide a
conveniente automake hook to run Valgrind on all tests.
Add --enable-valgrind to ./configure call and then run make
check-valgrind to run memcheck, helgrind, drd and sgcheck on all
tests. Run check-valgrind-memcheck to run only memcheck.
Solution: run Valgrind only on the default Linux build to avoid
increasing the runtime.
Solution: update builds/valgrind/valgrind.supp to ignore glibc's
__libc_freeres calls. This code runs after the program exits, and
tries to de-allocate memory allocated internally by glibc, so it has
nothing to do with libzmq code. This suppression is added by default
in newer versions of Valgrind, not yet available on older
distributions.
Solution: do not run test_fork if --enable-valgrind is set. Note that
later versions of Valgrind (3.11) not yet available in all
distributions fix this problem, so we might revert in the future.
Solution: run Travis CI in newer Trusty (14.04 LTS) release.
Solution: pass built-root when calling coveralls, to help it find the
right path to the source code.
hintjens added a commit that referenced this pull request Mar 19, 2016
Add Valgrind make target and CI run
@hintjens hintjens merged commit 98ab7f4 into zeromq:master Mar 19, 2016
@bluca bluca deleted the valgrind branch March 19, 2016 22:56
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