From: Michal B. (TAU) <mic...@tu...> - 2019-09-11 11:49:50
|
Hi Andreas, > valgrind. Were you able to reproduce that on your end? Yes; I commented in the issue. > Possible memory leak in POCL: https://gitlab.tiker.net/inducer/pytential/issues/131 We have a buildbot which tracks memory leaks by building pocl with Address Sanitizer (cmake -DENABLE_ASAN=ON). I have discovered that due to some faulty logic in cmake/ctest, some memleaks went unnoticed; this has now been fixed in release_1_4 & master. Ofc it's possible that it's a different leak; the test coverage is not full. Unfortunately i don't have any good advice for finding memory leaks when using pocl in Python. ASan may be impossible to use, and valgrind will probably report a lot of false positives (and be slow). Also i'm not sure it's possible to force Python to release an object, which makes it even more problematic. With C/C++ it's much simpler - if you call clUnloadPlatformCompiler() at the end of your program, and you've properly released all cl_* objects, pocl will additionally release all LLVM related data, including long-lived static data structures; after this there should only be a single memory leak, from LLVM signal handlers. Regards, -- mb |