Re:CWE Top Most Dangerous Software Weaknesses
by deadletters on Thursday July 13, 2023 @09:24AM
(#36708735)
ASan is better for finding memory corruption afaik
Re:CWE Top Most Dangerous Software Weaknesses
by amelius on Thursday July 13, 2023 @12:33PM
(#36711937)
Ok. But I'm guessing it has the same problems. I.e., if half your libraries/modules have never seen it, then you'll get a lot of noise. Happy to be proved wrong.
Re:CWE Top Most Dangerous Software Weaknesses
by deadletters on Thursday July 20, 2023 @11:33AM
(#36802030)
The compiler can't add checks into code it hasn't compiled. External modules, unless they are doing weird things which you do want to know about, should not generate ASan reports... on Linux.
Re:CWE Top Most Dangerous Software Weaknesses
by TheNewAndy on Thursday July 13, 2023 @07:06PM
(#36717305)
I use valgrind regularly, and prefer it over asan. asan will result in a faster executable which is nice, but I far prefer valgrind's output than asan's (this might be preference, but I find it to be clearer), and various things break when building with asan so I never make it default. Being able to valgrind stuff without recompiling is very convenient.
I'm also not sure if asan has an equivalent to --leak-check=full
Re:CWE Top Most Dangerous Software Weaknesses
by PhilipRoman on Thursday July 13, 2023 @12:37PM
(#36712019)
Valgrind, ASAN and AFL are my holy trinity when it comes to bug squashing.
I'm surprised that you have a problem with python modules - I use Valgrind specifically when I need to test executables without recompiling.
Re:CWE Top Most Dangerous Software Weaknesses
by fulafel on Thursday July 13, 2023 @01:40PM
(#36713060)
It is useful but quite limited for security bugs - it's dynamic instrumentation so you'd need to test with the input triggering the vulnerability.
Re:CWE Top Most Dangerous Software Weaknesses
by gavinhoward on Saturday July 15, 2023 @11:23PM
(#36743245)
Absolutely. I enable Valgrind on every default debug build of mine. It's my favorite tool.
I have even made it recognize my custom allocators and report bugs with them too.
When combined with my second favorite tool, AFL++, I have a good shot at eliminating most memory bugs. AFL++ finds paths through the software, and I run every single one of those paths through Valgrind. It's beautiful.
I've noticed that using Valgrind on Python systems is almost impossible because most modules have not been built with Valgrind in mind and thus you get swamped in noise.
I suppose the same is true for any large system.