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

CI should be using valgrind #31

Open
hardbyte opened this issue Jun 7, 2017 · 2 comments
Open

CI should be using valgrind #31

hardbyte opened this issue Jun 7, 2017 · 2 comments
Assignees

Comments

@hardbyte
Copy link
Collaborator

hardbyte commented Jun 7, 2017

Run Memcheck on the binary and fail if it detects a memory leak or bad access.

Aha! Link: https://csiro.aha.io/features/ANONLINK-75

@unzvfu
Copy link

unzvfu commented Jan 10, 2018

The difficulty here is that the library is tested through Python. Normally what we'd do is just run our test suite with Valgrind:

$ valgrind --leak-check=yes ./mytests

Unfortunately Valgrind finds it very difficult to distinguish (i) problems that are caused by the library that we're interested in, and (ii) "apparent" problems arising from within the Python binary. This is not Valgrind's fault, the memory model makes it practically impossible to make this distinction correctly. The upshot is that

$ valgrind --leak-check=yes python -m nose

will spew forth a bunch of irrelevant errors arising from Python, and we lose the information we want in the mess. There are some proposed solutions (here)[https://stackoverflow.com/a/45248015]; I tried them but they didn't help the situation.

@unzvfu
Copy link

unzvfu commented Jan 10, 2018

Next suggestion I found was to use a debug version of Python combined with Valgrind suppression file from NumPy. Didn't work either; not sure what the problem is. For the record, (NumPy does use Valgrind)[https://code.google.com/archive/p/distnumpy/wikis/valgrind.wiki], and their problem is approximately the same as ours, so perhaps I missed something.

The remaining option is to build a test suite that doesn't depend on Python.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants