Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.



Yes, absolutely. This is how I do it.

The test suite and asserts for every assumption are hugely important too. Testing under runtime is important.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: