Fantastic exchange from DConf

Jacob Carlborg via Digitalmars-d digitalmars-d at puremagic.com
Fri May 12 06:04:30 PDT 2017


On 2017-05-09 16:13, Walter Bright wrote:

> I agree. But one inevitably runs into problems relying on valgrind and
> other third party tools:
>
> 1. it isn't part of the language
>
> 2. it may not be available on your platform
>
> 3. somebody has to find it, install it, and integrate it into the
> dev/test process
>
> 4. it's incredibly slow to run valgrind, so there are powerful
> tendencies to skip it
>
> valgrind is a stopgap measure, and has saved me much grief over the
> years, but it is NOT the solution.

AddressSanitizer [1] is a tool similar to Valgrind which is built into 
the Clang compiler, just add an additional flag. It instruments the 
binary with the help of compiler so the execution speed will not be that 
much slower compared to a regular build.

Clang also contains a ThreadSanitizer which is supposed to detect data 
races.

[1] https://clang.llvm.org/docs/AddressSanitizer.html
[2] https://clang.llvm.org/docs/ThreadSanitizer.html

-- 
/Jacob Carlborg


More information about the Digitalmars-d mailing list