Thread overview
Valgrind
Apr 20, 2015
Robert M. Münch
Apr 20, 2015
John Colvin
Apr 20, 2015
John Colvin
Apr 20, 2015
Robert M. Münch
Apr 20, 2015
John Colvin
Apr 21, 2015
Nick B
Apr 21, 2015
Vladimir Panteleev
Apr 21, 2015
Martin Nowak
Apr 21, 2015
Brad Roberts
Feb 21, 2019
Robert M. Münch
April 20, 2015
Hi, I just found quite old posts about Valgrind and D. Can someone give me a short update, what the state of support for D is and if there is anythings special to take into account. Thanks a lot.

-- 
Robert M. Münch
http://www.saphirion.com
smarter | better | faster

April 20, 2015
On Monday, 20 April 2015 at 13:16:23 UTC, Robert M. Münch wrote:
> Hi, I just found quite old posts about Valgrind and D. Can someone give me a short update, what the state of support for D is and if there is anythings special to take into account. Thanks a lot.

The only special thing to take in to account is that valgrind will choke on DMD generated floating point code, so really you have to use GDC or LDC if you want to use valgrind.
April 20, 2015
On Monday, 20 April 2015 at 13:28:57 UTC, John Colvin wrote:
> On Monday, 20 April 2015 at 13:16:23 UTC, Robert M. Münch wrote:
>> Hi, I just found quite old posts about Valgrind and D. Can someone give me a short update, what the state of support for D is and if there is anythings special to take into account. Thanks a lot.
>
> The only special thing to take in to account is that valgrind will choke on DMD generated floating point code, so really you have to use GDC or LDC if you want to use valgrind.

Correction: The only special thing I know of.
April 20, 2015
On 2015-04-20 13:29:57 +0000, John Colvin said:

> On Monday, 20 April 2015 at 13:28:57 UTC, John Colvin wrote:
>> On Monday, 20 April 2015 at 13:16:23 UTC, Robert M. Münch wrote:
>>> Hi, I just found quite old posts about Valgrind and D. Can someone give me a short update, what the state of support for D is and if there is anythings special to take into account. Thanks a lot.
>> 
>> The only special thing to take in to account is that valgrind will choke on DMD generated floating point code, so really you have to use GDC or LDC if you want to use valgrind.
> 
> Correction: The only special thing I know of.

Ok, thanks.

Were the causes ever analyzed? I'm a bit wondering why it happens on floating point stuff...

-- 
Robert M. Münch
http://www.saphirion.com
smarter | better | faster

April 20, 2015
On Monday, 20 April 2015 at 16:58:18 UTC, Robert M. Münch wrote:
> On 2015-04-20 13:29:57 +0000, John Colvin said:
>
>> On Monday, 20 April 2015 at 13:28:57 UTC, John Colvin wrote:
>>> On Monday, 20 April 2015 at 13:16:23 UTC, Robert M. Münch wrote:
>>>> Hi, I just found quite old posts about Valgrind and D. Can someone give me a short update, what the state of support for D is and if there is anythings special to take into account. Thanks a lot.
>>> 
>>> The only special thing to take in to account is that valgrind will choke on DMD generated floating point code, so really you have to use GDC or LDC if you want to use valgrind.
>> 
>> Correction: The only special thing I know of.
>
> Ok, thanks.
>
> Were the causes ever analyzed? I'm a bit wondering why it happens on floating point stuff...

valgrind doesn't have full support for x87 code, which dmd emits all over the place.
April 21, 2015
On Monday, 20 April 2015 at 13:28:57 UTC, John Colvin wrote:
> The only special thing to take in to account is that valgrind will choke on DMD generated floating point code

I actually fixed this problem a while ago.
https://github.com/D-Programming-Language/dmd/pull/4368

An actual problem with valgrind is the GC, because most of it's operations appear to valgrind as memory corruptions.
You can GC.disable() collections, use gcstub.d, or help Vladimir with his valgrind/GC support to make things work.

http://dlang.org/phobos/core_memory.html#.GC.disable
https://github.com/D-Programming-Language/druntime/blob/master/src/gcstub/gc.d
https://github.com/CyberShadow/druntime/commits/valgrind
April 21, 2015
On Monday, 20 April 2015 at 17:25:55 UTC, John Colvin wrote:
> On Monday, 20 April 2015 at 16:58:18 UTC, Robert M. Münch wrote:
>> On 2015-04-20 13:29:57 +0000, John Colvin said:



>>
>> Were the causes ever analyzed? I'm a bit wondering why it happens on floating point stuff...
>
> valgrind doesn't have full support for x87 code, which dmd emits all over the place.

There is company is Germany, which does Valgrind consultancy,

http://www.open-works.net/contact.html

which could fix this issue, if you are prepared to throw some money their way.

Nick
April 21, 2015
On Monday, 20 April 2015 at 13:29:58 UTC, John Colvin wrote:
> On Monday, 20 April 2015 at 13:28:57 UTC, John Colvin wrote:
>> On Monday, 20 April 2015 at 13:16:23 UTC, Robert M. Münch wrote:
>>> Hi, I just found quite old posts about Valgrind and D. Can someone give me a short update, what the state of support for D is and if there is anythings special to take into account. Thanks a lot.
>>
>> The only special thing to take in to account is that valgrind will choke on DMD generated floating point code, so really you have to use GDC or LDC if you want to use valgrind.
>
> Correction: The only special thing I know of.

AFAIK, this has been fixed a long time ago.
April 21, 2015
Valgrind has a mechanism for teaching it how to ignore certain patterns.  A long time ago I setup suppressions for the gc, but the code has changed out from under that version so the work would need to be redone.

On 4/20/2015 7:23 PM, Martin Nowak via Digitalmars-d-learn wrote:
> On Monday, 20 April 2015 at 13:28:57 UTC, John Colvin wrote:
>> The only special thing to take in to account is that valgrind will
>> choke on DMD generated floating point code
>
> I actually fixed this problem a while ago.
> https://github.com/D-Programming-Language/dmd/pull/4368
>
> An actual problem with valgrind is the GC, because most of it's
> operations appear to valgrind as memory corruptions.
> You can GC.disable() collections, use gcstub.d, or help Vladimir with
> his valgrind/GC support to make things work.
>
> http://dlang.org/phobos/core_memory.html#.GC.disable
> https://github.com/D-Programming-Language/druntime/blob/master/src/gcstub/gc.d
>
> https://github.com/CyberShadow/druntime/commits/valgrind
February 21, 2019
Hi, well I just found my old post and have the same question again. Any news / new insights on this?

On 2015-04-20 13:16:23 +0000, Robert M. Münch said:

> Hi, I just found quite old posts about Valgrind and D. Can someone give me a short update, what the state of support for D is and if there is anythings special to take into account. Thanks a lot.


-- 
Robert M. Münch
http://www.saphirion.com
smarter | better | faster