(no title)
paulf38 | 2 months ago
Your library has many issues. Some should be easy to fix. You missed many allocation/deallocation functions (3 from ISO C, 1 from POSIX and 4 non-standard ones).
Others will be difficult or impossible for you to address. Your use of --wrap will not work with exes that link to static libc. macOS ld does not support --wrap. You will need to use another mechanism if you want to support macOS. I assume not supporting Windows is intentional.
The other big issue is with custom memory pools. That is always a difficult problem. Valgrind and the sanitizers require user instrumentation. Your leak detection will work with memory pools that just subdivide memory allocated with malloc etc. It won't work for memory pools that work like malloc itself and use brk/sbrk/mmap.
> Let’s make C testing suck less in 2025.
Didn't Bjarne Stroustrup do that already back in 1985?
thebadkraft|2 months ago
Besides, mine is intended to be a non-invasive memory counter, that's all. Want more invasive memory scoping? Write a MemCheck hook and generate all the metrics you want. Want to make sure your memory pool doesn't leak, you have to find another way. Oh well.
Thanks for checking it out, though. I've got a lot on my plate so issues with SigmaTest are expected. The core library I'm working on is putting SigmaTest through it's paces ... it's doing it's job and letting me know if I miss freeing something here or there. It's just a tool and it's helpful.