On Fri, Jun 10, 2016 at 6:00 PM, Kim Gr?sman kim.grasman@... [testdrivendevelopment] <testdrivendevelopment@...> wrote: Most of what valgrind / address sanitizer does isn't needed in a saner language like ruby (or D).
I have a colleague who tried to go that route, I agree, not pretty.
My approach does assume that you have identified all shared state and appropriately serialized access to it. So it is now merely a matter of verify that your event handlers can handle any sequence of events the outside world may throw at them. This is made a _lot_ easier by only communicating between threads via message passing. (A matter that requires discipline). Did I ever mention I hate multithreading? I know I am not smart enough to do it reliably, and all evidence I have seen leads me to have severe doubts about the rest of humanity. Yes, it is trivial to get a trivial threading program to work, it's pretty easy to get a non-trivial one working 90% of the time. But as you add 9's there seems to always be one more bug no matter how smart the programmers. ? Carter's Corollary to the Dunning-Kruger effect : Those people who are indeed smart and are accurately aware of how smart they are, still aren't smart enough to do multi-threading. They produce pretty much the same number of bugs, the bugs are just further down the long tail of probability.
I've devised a "build for checkin" and a "background build" split. It would be nice if we could run every test fast enough to give instant feed back... but as we add products.... we can't. So the "build for checkin" guarantees that all developers on currently active projects will be able to checkout and continue working. The background build wakes up a farm of servers and runs the tests under valgrind and address sanitizer and for every product. I haven't got as far as adding fuzzers yet. ?
And given a chance I would hop our developement to D to keep largish classes of bugs from being writen in the first place. -- John Carter? ? ? ? ? ? ? ? ? ? ? ? ? ?? Phone : (64)(3) 358 6639
Tait Electronics? ? ? ? ? ? ? ? ? ? ? ? Fax?? : (64)(3) 359 4632 PO Box 1645 Christchurch? ? ? ? ? ? ? ? Email : john.carter@... New Zealand This Communication is Confidential. We only send and receive email on the basis of the terms set out at |