Emmanuel

LEAX – CLI tool that explains C memory leaks and suggests fixes

by

Hello everyone,

I built an open-source tool called LEAX.

https://github.com/hooop/leax

It’s a CLI that acts as a companion to Valgrind to help understand memory leaks in C programs.

It combines Valgrind analysis, GDB-based tracing, and Mistral AI to:

• identify the root cause of a leak

• explain why it happens

• suggest a possible fix

The memory analysis itself is deterministic (based on execution traces), while the AI is mainly used to explain the “story” of memory in the program in plain language.

It works well on classic C programs using malloc/free. There are still limitations in some cases (multi-process programs, etc.), and the tool is actively being improved.

I’d love to hear feedback if you try it on your C projects!

🙏

28 views

Add a comment

Replies

Be the first to comment