You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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.
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
The text was updated successfully, but these errors were encountered: