4 ms·
Write a full unit and functional test suite and run them with asan, tsan, msan and maybe valgrind. This has caught all the memory bugs before getting to product
by snovv_crash 4y ago
Write a full unit and functional test suite and run them with asan, tsan, msan and maybe valgrind. This has caught all the memory bugs before getting to production in my experience.
You need the test suite to verify that your code does what you think it does anyways, the sanitizers are just a nice bonus to verify that it also has the safety you think it does.
- ghoward 4y agoYes, absolutely. This is how I do it. The test suite and asserts for every assumption are hugely important too. Testing under runtime is important.