Unable to use tradional tools to find memory leaks

Brad Roberts braddr at puremagic.com
Sat Sep 21 10:03:06 PDT 2013


On 9/21/13 9:01 AM, Maxim Fomin wrote:
> On Saturday, 21 September 2013 at 14:30:19 UTC, Flamaros wrote:
>> I tried to used Valgrind (Linux) and Dr Memory (Windows) without success to find a big leak I have
>> in my application.
>> But both tools can't launch my application without make it crash.
>
> Is application crashing without these tools? Probably you have some bug which is detected by valgrind.
>
> By the way, some pitfalls of using valgrind for testing D code:
>
> 1) Its implementation of float numbers at compile time is buggy (for example, there may be static
> asserts which are true when running under native envorionment and false under valgrind)
> 2) Dmd's codegen is sometimes not supported by valgrind (cannot execute some instructions which is
> rare case when something from D beats some tool outside)
> 3) It has some false positives regarding using uninitialized values especially during execution of
> GC code.
>
>> Do I need do something particular, to have a chance to see one of those tool working fine with my
>> application?
>
> If you run into #2 then you cannot fix it.

That's wrong.  Both DMD and Valgrind are software, both of which can be debugged and changed. 
Please file appropriate bug reports, hopefully with nicely minimized test cases.




More information about the Digitalmars-d-learn mailing list