Valgrind and GC

qznc qznc at web.de
Mon Oct 21 03:51:32 PDT 2013


On Monday, 21 October 2013 at 10:36:21 UTC, Artem Tarasov wrote:
> There seems to be some serious issue with the GC, yet almost no 
> attention
> is paid to that.
> (See e.g. this thread:
> http://forum.dlang.org/thread/anhitkodvlstehwxasld@forum.dlang.org)
>
> I did a simple test: `void main { new ubyte[65536]; }`. This 
> doesn't pass
> memcheck!
> Valgrind tells about using uninitialized values in
> core.thread.callWithStackShell called by gc.gcx.Gcx.mark.

A conservative garbage collector is never "correct" according to 
Valgrind [0]. You need to configure Valgrind to ignore the GC. 
Here is an example for the Boehm GC: 
https://github.com/UU-ComputerScience/uhc/tree/master/EHC/misc/valgrind

[0] 
http://www.hpl.hp.com/hosted/linux/mail-archives/gc/2004-November/000629.html


More information about the Digitalmars-d mailing list