3 ms·
I want to know how to run Valgrind on a Python program that uses lots of different modules. The amount of noise I usually get is so large that Valgrind becomes
by amelius 2y ago
I want to know how to run Valgrind on a Python program that uses lots of different modules. The amount of noise I usually get is so large that Valgrind becomes useless.
- carlmr 2y agohttps://stackoverflow.com/a/45248015 https://stackoverflow.com/a/45248015
- amelius 2y agoThanks, but I think I looked into that when I ran into the problem. Iirc, the main problem was that most Python modules are not designed with Valgrind in mind (so they generate a lot of noisy/irrelevant warnings and errors) I wish module maintainers would make running Valgrind a part of their QC process.
- carlmr 2y agoUnderstandable. I don't think there's a good way around this though. Even if you run valgrind on a C++ repo that hasn't seen much valgrind use, you'll get a lot of output. But that output is because the memory management is usually broken in every larger C++ repo which isn't developed by a small team of experts.
- wallstprog 2y agoYou might want to take a look at https://github.com/nyfix/memleaktest https://github.com/nyfix/memleaktest We've open-sourced the tools we use to run valgrind (and ASAN) on large mixed C++/Java code bases. The JVM in particular triggers a slew of errors which can make filtering valgrind output impractical, but the scripts we developed can handle that. FWIW, we use these tools every day on the code that goes into NYFIX Marketplace (https://www.broadridge.com/financial-services/capital-markets/trading-and-connectivity/order-routing-network https://www.broadridge.com/financial-services/capital-market...).
- amelius 2y agoThat's very interesting, thanks!