Elektrine lite

← Feed

@JdeBP@mastodonapp.uk

2026-07-07 21:31 UTC

@bytebro@mastodonapp.uk clang, not GCC. It does have a whole 'sanitization' system. I predict that it won't be any simpler for you than valgrind. (-: https://clang.llvm.org/docs/AddressSanitizer.html MSVC has a SAL system that can be useful for static, rather than runtime, checking of some stuff. https://learn.microsoft.com/en-gb/cpp/code-quality/understanding-sal My experience of valgrind is that it really really slows the program down, and generates tonnes of output that has to be sifted through. But there's no magic bullet that does away with that when one is debugging memory problems. #ComputerProgramming #clang #LLVM #MicrosoftVisualC

Replies (2)

  • @bytebro@mastodonapp.uk 2026-07-07 21:35

    @JdeBP@mastodonapp.uk OK, thx. I think the reason I remember 'purify' fondly is that it would just ping up an editor window and show you where it thought your 'stupid' was. Anyway, my current issue is resolved, for whatever that's worth to anyone else, and it just reminds one that sometimes the best code-reviewer is a sceptical geek with 'no skin in the game'!

    Open ##5052062

  • @pinskia@hachyderm.io 2026-07-07 22:28

    @JdeBP@mastodonapp.uk @bytebro@mastodonapp.uk Address Sanitizer is implemented in GCC too. purify was more like Coverity. And Clang Static Analyzer (https://clang-analyzer.llvm.org/) And now GCC analyzer (https://gcc.gnu.org/onlinedocs/gcc-16.1.0/gcc/Static-Analyzer-Options.html) Are FOSS versions of static code analyzers. GCC's version is just starting up a few years ago and still has long way to go for decent support. It does work for C code. C++ code support is being worked on this year with a GSOC project and that seems to progressing really well (meaning patches are going on). I don't know the state of clang's and from what I have seen it stalled.

    Open ##5052065